lance_index::vector::ivf

Function new_ivf_transformer

Source
pub fn new_ivf_transformer(
    centroids: FixedSizeListArray,
    metric_type: DistanceType,
    transforms: Vec<Arc<dyn Transformer>>,
) -> IvfTransformer
Expand description

Create an IVF from the flatten centroids.

ยงParameters

  • centroids: a flatten floating number array of centroids.
  • dimension: dimension of the vector.
  • metric_type: metric type to compute pair-wise vector distance.
  • transforms: a list of transforms to apply to the vector column.
  • range: only covers a range of partitions. Default is None