Struct flechasdb::db::build::DatabaseBuilder
source · pub struct DatabaseBuilder<T, VS>where
VS: VectorSet<T>,{ /* private fields */ }Expand description
Vector database builder.
Implementations§
source§impl<T, VS> DatabaseBuilder<T, VS>where
T: Scalar,
VS: VectorSet<T> + Partitioning<T, VS>,
impl<T, VS> DatabaseBuilder<T, VS>where T: Scalar, VS: VectorSet<T> + Partitioning<T, VS>,
sourcepub fn with_partitions(self, num_partitions: NonZeroUsize) -> Self
pub fn with_partitions(self, num_partitions: NonZeroUsize) -> Self
Sets the number of partitions.
sourcepub fn with_divisions(self, num_divisions: NonZeroUsize) -> Self
pub fn with_divisions(self, num_divisions: NonZeroUsize) -> Self
Sets the number of subvector divisions.
sourcepub fn with_clusters(self, num_clusters: NonZeroUsize) -> Self
pub fn with_clusters(self, num_clusters: NonZeroUsize) -> Self
Sets the number of clusters for product quantization (PQ).
sourcepub fn build_with_events<EventHandler>(
self,
event: EventHandler
) -> Result<Database<T, VS>, Error>where
EventHandler: FnMut(BuildEvent<'_, T>),
pub fn build_with_events<EventHandler>( self, event: EventHandler ) -> Result<Database<T, VS>, Error>where EventHandler: FnMut(BuildEvent<'_, T>),
Builds the vector database with an event handler.
Auto Trait Implementations§
impl<T, VS> RefUnwindSafe for DatabaseBuilder<T, VS>where T: RefUnwindSafe, VS: RefUnwindSafe,
impl<T, VS> Send for DatabaseBuilder<T, VS>where T: Send, VS: Send,
impl<T, VS> Sync for DatabaseBuilder<T, VS>where T: Sync, VS: Sync,
impl<T, VS> Unpin for DatabaseBuilder<T, VS>where T: Unpin, VS: Unpin,
impl<T, VS> UnwindSafe for DatabaseBuilder<T, VS>where T: UnwindSafe, VS: UnwindSafe,
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