pub struct MmapDynamicDiskANN<T, D>{ /* private fields */ }Expand description
A fixed-capacity dynamic index. Vector and u32 adjacency regions have the
same row-major mmap layout as DiskANN; version and validity arrays follow.
Implementations§
Source§impl<T, D> MmapDynamicDiskANN<T, D>
impl<T, D> MmapDynamicDiskANN<T, D>
pub fn create_from_static( index: &DiskANN<T, D>, capacity: usize, alpha: f32, path: impl AsRef<Path>, ) -> Result<Self, DiskAnnError>
pub fn open(path: impl AsRef<Path>, dist: D) -> Result<Self, DiskAnnError>
pub fn capacity(&self) -> usize
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn is_valid(&self, id: u32) -> bool
pub fn flush(&self) -> Result<(), DiskAnnError>
pub fn search(&self, query: &[T], k: usize, beam: usize) -> Vec<u32>
pub fn insert( &mut self, vector: Vec<T>, beam: usize, ) -> Result<u32, DiskAnnError>
Sourcepub fn insert_batch(
&mut self,
vectors: Vec<Vec<T>>,
beam: usize,
) -> Result<Vec<u32>, DiskAnnError>
pub fn insert_batch( &mut self, vectors: Vec<Vec<T>>, beam: usize, ) -> Result<Vec<u32>, DiskAnnError>
Parallel search/planning, followed by deterministic graph commits.
pub fn delete( &mut self, id: u32, repair_beam: usize, repair_degree: usize, ) -> Option<DeleteStats>
Sourcepub fn delete_batch(
&mut self,
ids: &[u32],
repair_beam: usize,
repair_degree: usize,
) -> Vec<DeleteStats>
pub fn delete_batch( &mut self, ids: &[u32], repair_beam: usize, repair_degree: usize, ) -> Vec<DeleteStats>
MERIT batch deletion: invalidate together, build repair plans in parallel, then commit potentially overlapping adjacency changes deterministically.
Auto Trait Implementations§
impl<T, D> Freeze for MmapDynamicDiskANN<T, D>
impl<T, D> RefUnwindSafe for MmapDynamicDiskANN<T, D>
impl<T, D> Send for MmapDynamicDiskANN<T, D>where
PhantomData<T>: Send,
impl<T, D> Sync for MmapDynamicDiskANN<T, D>where
PhantomData<T>: Sync,
impl<T, D> Unpin for MmapDynamicDiskANN<T, D>
impl<T, D> UnsafeUnpin for MmapDynamicDiskANN<T, D>
impl<T, D> UnwindSafe for MmapDynamicDiskANN<T, D>
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> 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