Attention
The vector search and clustering algorithms in RAFT are being migrated to a new library dedicated to vector search called cuVS. We will continue to support the vector search algorithms in RAFT during this move, but will no longer update them after the RAPIDS 24.06 (June) release. We plan to complete the migration by RAPIDS 24.10 (October) release and they will be removed from RAFT altogether in the 24.12 (December) release.
Sparse Distance#
-
static const std::unordered_set<raft::distance::DistanceType> raft::sparse::distance::supportedDistance = {raft::distance::DistanceType::L2Expanded, raft::distance::DistanceType::L2Unexpanded, raft::distance::DistanceType::L2SqrtExpanded, raft::distance::DistanceType::L2SqrtUnexpanded, raft::distance::DistanceType::InnerProduct, raft::distance::DistanceType::L1, raft::distance::DistanceType::Canberra, raft::distance::DistanceType::Linf, raft::distance::DistanceType::LpUnexpanded, raft::distance::DistanceType::JaccardExpanded, raft::distance::DistanceType::CosineExpanded, raft::distance::DistanceType::HellingerExpanded, raft::distance::DistanceType::DiceExpanded, raft::distance::DistanceType::CorrelationExpanded, raft::distance::DistanceType::RusselRaoExpanded, raft::distance::DistanceType::HammingUnexpanded, raft::distance::DistanceType::JensenShannon, raft::distance::DistanceType::KLDivergence}#
-
template<typename value_idx = int, typename value_t = float>
void raft::sparse::distance::pairwiseDistance(value_t *out, detail::distances_config_t<value_idx, value_t> input_config, raft::distance::DistanceType metric, float metric_arg)# Compute pairwise distances between A and B, using the provided input configuration and distance function.
- Template Parameters:
value_idx – index type
value_t – value type
- Parameters:
out – [out] dense output array (size A.nrows * B.nrows)
input_config – [in] input argument configuration
metric – [in] distance metric to use
metric_arg – [in] metric argument (used for Minkowski distance)