Package org.openrefine.clustering.knn
Class DistanceFactory
- java.lang.Object
-
- org.openrefine.clustering.knn.DistanceFactory
-
public class DistanceFactory extends Object
Registry of distances for kNN clustering.- Author:
- Antonin Delpeuch
-
-
Field Summary
Fields Modifier and Type Field Description protected static Map<String,SimilarityDistance>
_distances
-
Constructor Summary
Constructors Constructor Description DistanceFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SimilarityDistance
get(String name)
Returns the distance registered under this name, or null if it does not exist.static List<String>
getDistanceNames()
Lists the available distances, by name.static void
put(String name, SimilarityDistance distance)
Registers a new distance under a name.
-
-
-
Field Detail
-
_distances
protected static final Map<String,SimilarityDistance> _distances
-
-
Method Detail
-
get
public static SimilarityDistance get(String name)
Returns the distance registered under this name, or null if it does not exist.
-
put
public static void put(String name, SimilarityDistance distance)
Registers a new distance under a name.
-
-