pub struct FloatRoutingTree { /* private fields */ }Implementations§
Source§impl FloatRoutingTree
impl FloatRoutingTree
pub fn dimension(&self) -> usize
pub fn level_counts(&self) -> impl ExactSizeIterator<Item = usize> + '_
pub fn leaf_centroids(&self) -> &[f32]
pub fn levels(&self) -> &[Vec<f32>]
pub fn child_offsets(&self) -> &[Vec<u32>]
Sourcepub fn route(
&self,
query: &[f32],
probes: usize,
) -> ScannResult<Vec<RoutedLeaf>>
pub fn route( &self, query: &[f32], probes: usize, ) -> ScannResult<Vec<RoutedLeaf>>
Route to the closest terminal partitions with a bounded beam.
Sourcepub fn route_with_scratch(
&self,
query: &[f32],
probes: usize,
scratch: &mut RoutingScratch,
output: &mut Vec<RoutedLeaf>,
) -> ScannResult<()>
pub fn route_with_scratch( &self, query: &[f32], probes: usize, scratch: &mut RoutingScratch, output: &mut Vec<RoutedLeaf>, ) -> ScannResult<()>
Allocation-reusing serving-path form of Self::route.
Sourcepub fn to_quantized_levels(&self) -> Vec<ScannRoutingLevel>
pub fn to_quantized_levels(&self) -> Vec<ScannRoutingLevel>
Quantize every level independently to the persisted u8 centroid plane.
pub fn from_quantized_levels( levels: &[ScannRoutingLevel], dimension: usize, ) -> ScannResult<Self>
Trait Implementations§
Source§impl Clone for FloatRoutingTree
impl Clone for FloatRoutingTree
Source§fn clone(&self) -> FloatRoutingTree
fn clone(&self) -> FloatRoutingTree
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 moreSource§impl Debug for FloatRoutingTree
impl Debug for FloatRoutingTree
Source§impl PartialEq for FloatRoutingTree
impl PartialEq for FloatRoutingTree
impl StructuralPartialEq for FloatRoutingTree
Auto Trait Implementations§
impl Freeze for FloatRoutingTree
impl RefUnwindSafe for FloatRoutingTree
impl Send for FloatRoutingTree
impl Sync for FloatRoutingTree
impl Unpin for FloatRoutingTree
impl UnsafeUnpin for FloatRoutingTree
impl UnwindSafe for FloatRoutingTree
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> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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> ⓘ
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