pub struct BuildTreeArgs<'a> {
pub store: &'a ReadableWritableListableStorage,
pub root_embeddings: &'a Array2<f32>,
pub representatives: &'a EmbeddingsSource,
pub dataset: &'a EmbeddingsSource,
pub total_levels: u32,
pub metric: Metric,
pub is_normalized: bool,
pub fallback_batch_vecs: usize,
pub chunk_shape: &'a [u64],
pub embedding_dtype: EmbeddingDtype,
pub memory_limit_bytes: usize,
}Expand description
build_tree’s parameters, bundled to keep its own signature manageable.
Fields§
§store: &'a ReadableWritableListableStorage§root_embeddings: &'a Array2<f32>§representatives: &'a EmbeddingsSourceEvery representative, starting with the root’s. The non-leaf levels are built from these.
dataset: &'a EmbeddingsSourceThe items the leaves hold.
total_levels: u32§metric: Metric§is_normalized: bool§fallback_batch_vecs: usizeThe chunk size assumed for a source that isn’t chunked.
chunk_shape: &'a [u64]§embedding_dtype: EmbeddingDtype§memory_limit_bytes: usizeTrait Implementations§
Source§impl<'a> Clone for BuildTreeArgs<'a>
impl<'a> Clone for BuildTreeArgs<'a>
Source§fn clone(&self) -> BuildTreeArgs<'a>
fn clone(&self) -> BuildTreeArgs<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for BuildTreeArgs<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for BuildTreeArgs<'a>
impl<'a> !Send for BuildTreeArgs<'a>
impl<'a> !Sync for BuildTreeArgs<'a>
impl<'a> !UnwindSafe for BuildTreeArgs<'a>
impl<'a> Freeze for BuildTreeArgs<'a>
impl<'a> Unpin for BuildTreeArgs<'a>
impl<'a> UnsafeUnpin for BuildTreeArgs<'a>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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