pub struct PrismIndex {
pub store: PointStore,
pub tree: PartitionTree,
pub graph: Graph,
pub local_graph: Graph,
pub medoids: Vec<u32>,
pub global_medoid: u32,
pub point_cell: Vec<u32>,
pub original_ids: Vec<u32>,
pub sq8: SQ8Store,
pub binary: BinaryStore,
pub config: PrismConfig,
}Expand description
The complete PRISM index.
Fields§
§store: PointStore§tree: PartitionTree§graph: Graph§local_graph: GraphLocal-only graph (intra-cell edges) for per-cell graph search.
medoids: Vec<u32>§global_medoid: u32§point_cell: Vec<u32>Reverse mapping: point_id → cell index.
original_ids: Vec<u32>Maps internal ID → original ID.
sq8: SQ8StoreScalar-quantized vectors for distance computation.
binary: BinaryStoreBinary codes for Hamming pre-filter.
config: PrismConfigImplementations§
Source§impl PrismIndex
impl PrismIndex
Sourcepub fn build(store: PointStore, config: PrismConfig) -> Self
pub fn build(store: PointStore, config: PrismConfig) -> Self
Build a PRISM index from a PointStore (Algorithm 2).
Source§impl PrismIndex
impl PrismIndex
Sourcepub fn search(
&self,
query: &[f32],
filter: &Filter,
k: usize,
ef: usize,
) -> Vec<SearchResult>
pub fn search( &self, query: &[f32], filter: &Filter, k: usize, ef: usize, ) -> Vec<SearchResult>
Filtered k-NN search with automatic regime selection.
Sourcepub fn batch_search(
&self,
queries: &[f32],
filters: &[Filter],
nq: usize,
k: usize,
ef: usize,
) -> Vec<Vec<SearchResult>>
pub fn batch_search( &self, queries: &[f32], filters: &[Filter], nq: usize, k: usize, ef: usize, ) -> Vec<Vec<SearchResult>>
MQCB (Multi-Query Cell Batching) — groups queries by target cell so cell data stays warm in L3 across queries. Cells processed in parallel, queries within each cell sequentially.
Auto Trait Implementations§
impl Freeze for PrismIndex
impl RefUnwindSafe for PrismIndex
impl Send for PrismIndex
impl Sync for PrismIndex
impl Unpin for PrismIndex
impl UnsafeUnpin for PrismIndex
impl UnwindSafe for PrismIndex
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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