Skip to main content

cuvsNNDescentIndexParams

Struct cuvsNNDescentIndexParams 

Source
#[repr(C)]
pub struct cuvsNNDescentIndexParams { pub metric: cuvsDistanceType, pub metric_arg: f32, pub graph_degree: usize, pub intermediate_graph_degree: usize, pub max_iterations: usize, pub termination_threshold: f32, pub return_distances: bool, pub dist_comp_dtype: cuvsNNDescentDistCompDtype, }
Expand description

@defgroup nn_descent_c_index_params The nn-descent algorithm parameters. @{ / /** @brief Parameters used to build an nn-descent index

metric: The distance metric to use metric_arg: The argument used by distance metrics like Minkowskidistance graph_degree: For an input dataset of dimensions (N, D), determines the final dimensions of the all-neighbors knn graph which turns out to be of dimensions (N, graph_degree) intermediate_graph_degree: Internally, nn-descent builds an all-neighbors knn graph of dimensions (N, intermediate_graph_degree) before selecting the final graph_degree neighbors. It’s recommended that intermediate_graph_degree >= 1.5 * graph_degree max_iterations: The number of iterations that nn-descent will refine the graph for. More iterations produce a better quality graph at cost of performance termination_threshold: The delta at which nn-descent will terminate its iterations return_distances: Boolean to decide whether to return distances array dist_comp_dtype: dtype to use for distance computation. Defaults to NND_DIST_COMP_AUTO which automatically determines the best dtype for distance computation based on the dataset dimensions. Use NND_DIST_COMP_FP32 for better precision at the cost of performance and memory usage. This option is only valid when data type is fp32. Use NND_DIST_COMP_FP16 for better performance and memory usage at the cost of precision.

Fields§

§metric: cuvsDistanceType§metric_arg: f32§graph_degree: usize§intermediate_graph_degree: usize§max_iterations: usize§termination_threshold: f32§return_distances: bool§dist_comp_dtype: cuvsNNDescentDistCompDtype

Trait Implementations§

Source§

impl Clone for cuvsNNDescentIndexParams

Source§

fn clone(&self) -> cuvsNNDescentIndexParams

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 cuvsNNDescentIndexParams

Source§

impl Debug for cuvsNNDescentIndexParams

Source§

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

Formats the value using the given formatter. Read more

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.