Distance#
This page provides C++ class references for the publicly-exposed elements of the cuvs/distance
package. cuVS’s
distances have been highly optimized and support a wide assortment of different distance measures.
Distance Types#
#include <cuvs/distance/distance_types.hpp>
namespace cuvs::distance
-
enum cuvs::distance::DistanceType#
enum to tell how to compute distance
Values:
-
enumerator L2Expanded#
evaluate as dist_ij = sum(x_ik^2) + sum(y_ij)^2 - 2*sum(x_ik * y_jk)
-
enumerator L2SqrtExpanded#
same as above, but inside the epilogue, perform square root operation
-
enumerator CosineExpanded#
cosine distance
-
enumerator L1#
L1 distance
-
enumerator L2Unexpanded#
evaluate as dist_ij += (x_ik - y-jk)^2
-
enumerator L2SqrtUnexpanded#
same as above, but inside the epilogue, perform square root operation
-
enumerator InnerProduct#
basic inner product
-
enumerator Linf#
Chebyshev (Linf) distance
-
enumerator Canberra#
Canberra distance
-
enumerator LpUnexpanded#
Generalized Minkowski distance
-
enumerator CorrelationExpanded#
Correlation distance
-
enumerator JaccardExpanded#
Jaccard distance
-
enumerator HellingerExpanded#
Hellinger distance
-
enumerator Haversine#
Haversine distance
-
enumerator BrayCurtis#
Bray-Curtis distance
-
enumerator JensenShannon#
Jensen-Shannon distance
-
enumerator HammingUnexpanded#
Hamming distance
-
enumerator KLDivergence#
KLDivergence
-
enumerator RusselRaoExpanded#
RusselRao
-
enumerator DiceExpanded#
Dice-Sorensen distance
-
enumerator Precomputed#
Precomputed (special value)
-
enumerator L2Expanded#