Package com.github.jelmerk.knn
Class DistanceFunctions
java.lang.Object
com.github.jelmerk.knn.DistanceFunctions
Collection of distance functions.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DistanceFunction<double[],
Double> Calculates the bray curtis distance.static final DistanceFunction<double[],
Double> Calculates the canberra distance.static final DistanceFunction<double[],
Double> Calculates the correlation distance.static final DistanceFunction<double[],
Double> Calculates the cosine distance.static final DistanceFunction<double[],
Double> Calculates the euclidean distance.static final DistanceFunction<double[],
Double> Calculates the inner product.static final DistanceFunction<double[],
Double> Calculates the manhattan distance.static final DistanceFunction<SparseVector<double[]>,
Double> Calculates the inner product.static final DistanceFunction<float[],
Float> Calculates the bray curtis distance.static final DistanceFunction<float[],
Float> Calculates the canberra distance.static final DistanceFunction<float[],
Float> Calculates the correlation distance.static final DistanceFunction<float[],
Float> Calculates the cosine distance.static final DistanceFunction<float[],
Float> Calculates the euclidean distance.static final DistanceFunction<float[],
Float> Calculates the inner product distance.static final DistanceFunction<float[],
Float> Calculates the manhattan distance.static final DistanceFunction<SparseVector<float[]>,
Float> Calculates the inner product. -
Method Summary
-
Field Details
-
FLOAT_COSINE_DISTANCE
Calculates the cosine distance. -
FLOAT_INNER_PRODUCT
Calculates the inner product distance. -
FLOAT_EUCLIDEAN_DISTANCE
Calculates the euclidean distance. -
FLOAT_CANBERRA_DISTANCE
Calculates the canberra distance. -
FLOAT_BRAY_CURTIS_DISTANCE
Calculates the bray curtis distance. -
FLOAT_CORRELATION_DISTANCE
Calculates the correlation distance. -
FLOAT_MANHATTAN_DISTANCE
Calculates the manhattan distance. -
DOUBLE_COSINE_DISTANCE
Calculates the cosine distance. -
DOUBLE_INNER_PRODUCT
Calculates the inner product. -
DOUBLE_EUCLIDEAN_DISTANCE
Calculates the euclidean distance. -
DOUBLE_CANBERRA_DISTANCE
Calculates the canberra distance. -
DOUBLE_BRAY_CURTIS_DISTANCE
Calculates the bray curtis distance. -
DOUBLE_CORRELATION_DISTANCE
Calculates the correlation distance. -
DOUBLE_MANHATTAN_DISTANCE
Calculates the manhattan distance. -
FLOAT_SPARSE_VECTOR_INNER_PRODUCT
Calculates the inner product. -
DOUBLE_SPARSE_VECTOR_INNER_PRODUCT
public static final DistanceFunction<SparseVector<double[]>,Double> DOUBLE_SPARSE_VECTOR_INNER_PRODUCTCalculates the inner product.
-