All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.TKnudsen.ComplexDataObject.model.distanceMeasure.Double.DoubleDistanceMeasureTools Maven / Gradle / Ivy

Go to download

A library that models real-world objects in Java, referred to as ComplexDataObjects. Other features: IO and preprocessing of ComplexDataObjects.

The newest version!
package com.github.TKnudsen.ComplexDataObject.model.distanceMeasure.Double;

import java.util.Arrays;
import java.util.List;

/**
 * 

* Title: DoubleDistanceMeasureTools *

* *

* Description: *

* *

* Copyright: Copyright (c) 2018 *

* * @author Juergen Bernard * @version 1.01 */ public class DoubleDistanceMeasureTools { public static DoubleDistanceMeasure getDistFunction(String distanceFunctionName) { DoubleDistanceMeasure distFunction = null; switch (distanceFunctionName) { case "EuclideanDistance": distFunction = new EuclideanDistanceMeasure(); break; case "ManhattanDistance": distFunction = new ManhattanDistanceMeasure(); break; case "ChebyshevDistance": distFunction = new ChebyshevDistance(); break; default: System.err.println( "DoubleDistanceMeasureTools: unknown distance function name. returning Euclidean Distance."); distFunction = new EuclideanDistanceMeasure(); break; } return distFunction; } public static List distanceMeasures() { return Arrays.asList(new String[] { "EuclideanDistance", "ChebyShevDistanceMeasure", "ManhattanDistance" }); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy