pub struct Manhattan<R>(/* private fields */);Expand description
Manhattan / L1 distance metric, parameterized by output type R.
Trait Implementations§
Source§impl<A, R> DistanceMetricScalar<A> for Manhattan<R>
impl<A, R> DistanceMetricScalar<A> for Manhattan<R>
Source§fn widen_coord(a: A) -> R
fn widen_coord(a: A) -> R
Widen a coordinate to the output type.
Source§fn rect_dist_after_update<const K: usize>(
rd: Self::Output,
off: &[Self::Output; K],
dim: usize,
new_off: Self::Output,
) -> Self::Output
fn rect_dist_after_update<const K: usize>( rd: Self::Output, off: &[Self::Output; K], dim: usize, new_off: Self::Output, ) -> Self::Output
Bounding-box distance after replacing a single axis offset. Read more
Source§fn combine_component(acc: &mut Self::Output, component: Self::Output)
fn combine_component(acc: &mut Self::Output, component: Self::Output)
Combine a per-axis contribution into an accumulated point or box distance. Read more
Source§fn dist<const K: usize>(
a: &[Self::Output; K],
b: &[Self::Output; K],
) -> Self::Output
fn dist<const K: usize>( a: &[Self::Output; K], b: &[Self::Output; K], ) -> Self::Output
Full point distance in widened coordinates.
Source§fn dist_raw<const K: usize>(a: &[A; K], b: &[A; K]) -> Self::Output
fn dist_raw<const K: usize>(a: &[A; K], b: &[A; K]) -> Self::Output
Full point distance on raw coordinates.
Source§fn rect_dist_from_off<const K: usize>(off: &[Self::Output; K]) -> Self::Output
fn rect_dist_from_off<const K: usize>(off: &[Self::Output; K]) -> Self::Output
Bounding-box distance derived from per-axis offsets to the query.
Auto Trait Implementations§
impl<R> Freeze for Manhattan<R>where
PhantomData<R>: Freeze,
impl<R> RefUnwindSafe for Manhattan<R>where
PhantomData<R>: RefUnwindSafe,
impl<R> Send for Manhattan<R>where
PhantomData<R>: Send,
impl<R> Sync for Manhattan<R>where
PhantomData<R>: Sync,
impl<R> Unpin for Manhattan<R>where
PhantomData<R>: Unpin,
impl<R> UnsafeUnpin for Manhattan<R>where
PhantomData<R>: UnsafeUnpin,
impl<R> UnwindSafe for Manhattan<R>where
PhantomData<R>: UnwindSafe,
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T, A> DistanceMetric<A> for Twhere
A: Copy,
T: DistanceMetricScalar<A> + DistanceMetricAvx512<A> + DistanceMetricAvx2<A> + DistanceMetricNeon<A>,
impl<T, A> DistanceMetric<A> for Twhere
A: Copy,
T: DistanceMetricScalar<A> + DistanceMetricAvx512<A> + DistanceMetricAvx2<A> + DistanceMetricNeon<A>,
Source§fn backtrack_block3<const K: usize>(
query_wide: Self::Output,
stems_ptr: NonNull<u8>,
block_base_idx: usize,
old_off: Self::Output,
rd: Self::Output,
best_dist: Self::Output,
) -> u8
fn backtrack_block3<const K: usize>( query_wide: Self::Output, stems_ptr: NonNull<u8>, block_base_idx: usize, old_off: Self::Output, rd: Self::Output, best_dist: Self::Output, ) -> u8
Autovec/scalar Block3 backtrack mask generation.
Source§fn backtrack_block3_with_bounds<const K: usize>(
query_wide: Self::Output,
stems_ptr: NonNull<u8>,
block_base_idx: usize,
parent_lower_bound: Self::Output,
parent_upper_bound: Self::Output,
old_off: Self::Output,
rd: Self::Output,
best_dist: Self::Output,
) -> u8
fn backtrack_block3_with_bounds<const K: usize>( query_wide: Self::Output, stems_ptr: NonNull<u8>, block_base_idx: usize, parent_lower_bound: Self::Output, parent_upper_bound: Self::Output, old_off: Self::Output, rd: Self::Output, best_dist: Self::Output, ) -> u8
Block3 bounds-aware backtrack mask generation.
Source§fn fill_block3_values_and_bounds<const K: usize>(
query_wide: Self::Output,
stems_ptr: NonNull<u8>,
block_base_idx: usize,
parent_lower_bound: Self::Output,
parent_upper_bound: Self::Output,
old_off: Self::Output,
rd: Self::Output,
best_dist: Self::Output,
new_off_values: &mut [Self::Output; 8],
rd_values: &mut [Self::Output; 8],
lower_bounds: &mut [Self::Output; 8],
upper_bounds: &mut [Self::Output; 8],
) -> u8
fn fill_block3_values_and_bounds<const K: usize>( query_wide: Self::Output, stems_ptr: NonNull<u8>, block_base_idx: usize, parent_lower_bound: Self::Output, parent_upper_bound: Self::Output, old_off: Self::Output, rd: Self::Output, best_dist: Self::Output, new_off_values: &mut [Self::Output; 8], rd_values: &mut [Self::Output; 8], lower_bounds: &mut [Self::Output; 8], upper_bounds: &mut [Self::Output; 8], ) -> u8
Block3 bounds-aware backtrack state fill.
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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
Source§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
Source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Performs the conversion.
Source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
Source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Performs the conversion.
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Returns whether the given value has been niched. Read more
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
Writes data to
out indicating that a T is niched.Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T, A> QueryMetric<A> for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> StrictAs for T
impl<T> StrictAs for T
Source§fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
Casts the value.
Source§impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
Source§fn strict_cast_from(src: Src) -> Dst
fn strict_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
Source§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.