Skip to main content

GraphParams

Struct GraphParams 

Source
pub struct GraphParams { /* private fields */ }
Expand description

Validated construction controls for one flat per-segment graph.

Implementations§

Source§

impl GraphParams

Source

pub fn new( r_target: u8, r_max: u8, alpha_build: f32, alpha_refine: f32, l_build: u16, checkpoint_batch_rows: u32, ) -> Result<Self, GraphParamsError>

Creates validated Vamana construction controls.

Source

pub const fn sift_1m() -> Self

Returns the Task 19-M3 SIFT-1M construction contract.

Source

pub const fn angular() -> Self

Returns the Task 19-M10 angular construction contract.

Source

pub fn with_checkpoint_batch_rows( self, checkpoint_batch_rows: u32, ) -> Result<Self, GraphParamsError>

Selects a different positive checkpoint batch size without changing graph quality.

Source

pub const fn should_build(self, row_count: u32) -> bool

Returns whether a sealed segment crosses Amendment A1’s graph threshold.

Source

pub const fn r_target(self) -> u8

Returns the normal pruned out-degree.

Source

pub const fn r_max(self) -> u8

Returns the persisted hard degree cap.

Source

pub const fn alpha_build(self) -> f32

Returns the first-pass occlusion factor.

Source

pub const fn alpha_refine(self) -> f32

Returns the second-pass occlusion factor.

Source

pub const fn l_build(self) -> u16

Returns the construction beam width.

Source

pub const fn checkpoint_batch_rows(self) -> u32

Returns rows processed between resumable checkpoints.

Trait Implementations§

Source§

impl Clone for GraphParams

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for GraphParams

Source§

impl Debug for GraphParams

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for GraphParams

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for GraphParams

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.