pub struct GraphParams {
pub l_build: usize,
pub alpha: f32,
pub backedge_ratio: f32,
pub vector_dtype: VectorDtype,
}Expand description
Graph configuration parameters persisted alongside the index.
These are needed to reconstruct the DiskANNIndex config on load.
Fields§
§l_build: usizel_build is the search list size used during index construction. When inserting a new vector into the DiskANN graph, the algorithm performs a greedy search to find the best neighbors to connect to. l_build controls how many candidate nodes are tracked during that search.
alpha: f32alpha is the pruning aggressiveness parameter used during graph construction. During pruning, when deciding whether to keep a candidate neighbor k for node i, the algorithm checks if there’s already a closer neighbor j that “occludes” k. The occlusion test is is governed by alpha.
backedge_ratio: f32backedge_ratio controls how many reverse (back) edges are added after pruning during graph construction.
vector_dtype: VectorDtypevector_dtype indicates the data type of the vectors stored in the index, which is necessary for correctly interpreting the raw bytes of the vectors when loading the index from disk.
Trait Implementations§
Source§impl Clone for GraphParams
impl Clone for GraphParams
Source§fn clone(&self) -> GraphParams
fn clone(&self) -> GraphParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GraphParams
impl Debug for GraphParams
Source§impl<'de> Deserialize<'de> for GraphParams
impl<'de> Deserialize<'de> for GraphParams
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for GraphParams
impl RefUnwindSafe for GraphParams
impl Send for GraphParams
impl Sync for GraphParams
impl Unpin for GraphParams
impl UnsafeUnpin for GraphParams
impl UnwindSafe for GraphParams
Blanket Implementations§
impl<T> AsyncFriendly for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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>
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>
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