Struct lance_index::vector::ivf::IvfImpl
source · pub struct IvfImpl<T: ArrowFloatType + Dot + L2> { /* private fields */ }Expand description
IVF - IVF file partition
Implementations§
source§impl<T: ArrowFloatType + Dot + L2 + ArrowPrimitiveType> IvfImpl<T>
impl<T: ArrowFloatType + Dot + L2 + ArrowPrimitiveType> IvfImpl<T>
pub fn new( centroids: MatrixView<T>, metric_type: MetricType, vector_column: &str, transforms: Vec<Arc<dyn Transformer>>, _range: Option<Range<u32>> ) -> Self
Trait Implementations§
source§impl<T: ArrowFloatType + Dot + L2 + ArrowPrimitiveType> Ivf for IvfImpl<T>
impl<T: ArrowFloatType + Dot + L2 + ArrowPrimitiveType> Ivf for IvfImpl<T>
source§fn compute_partitions<'life0, 'life1, 'async_trait>(
&'life0 self,
data: &'life1 FixedSizeListArray
) -> Pin<Box<dyn Future<Output = Result<UInt32Array>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn compute_partitions<'life0, 'life1, 'async_trait>(
&'life0 self,
data: &'life1 FixedSizeListArray
) -> Pin<Box<dyn Future<Output = Result<UInt32Array>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Compute the partitions for each vector in the input data. Read more
source§fn compute_residual<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
original: &'life1 FixedSizeListArray,
partitions: Option<&'life2 UInt32Array>
) -> Pin<Box<dyn Future<Output = Result<FixedSizeListArray>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn compute_residual<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
original: &'life1 FixedSizeListArray,
partitions: Option<&'life2 UInt32Array>
) -> Pin<Box<dyn Future<Output = Result<FixedSizeListArray>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Compute residual vector. Read more
source§fn find_partitions(
&self,
query: &dyn Array,
nprobes: usize
) -> Result<UInt32Array>
fn find_partitions( &self, query: &dyn Array, nprobes: usize ) -> Result<UInt32Array>
Find the closest partitions for the query vector.
source§impl<T: ArrowFloatType + Dot + L2> Transformer for IvfImpl<T>
impl<T: ArrowFloatType + Dot + L2> Transformer for IvfImpl<T>
source§fn transform<'life0, 'life1, 'async_trait>(
&'life0 self,
batch: &'life1 RecordBatch
) -> Pin<Box<dyn Future<Output = Result<RecordBatch>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn transform<'life0, 'life1, 'async_trait>(
&'life0 self,
batch: &'life1 RecordBatch
) -> Pin<Box<dyn Future<Output = Result<RecordBatch>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Transform a
RecordBatch of vectorsAuto Trait Implementations§
impl<T> Freeze for IvfImpl<T>
impl<T> !RefUnwindSafe for IvfImpl<T>
impl<T> Send for IvfImpl<T>
impl<T> Sync for IvfImpl<T>
impl<T> Unpin for IvfImpl<T>
impl<T> !UnwindSafe for IvfImpl<T>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more