[][src]Struct dinotree_alg::query::KnearestResult

pub struct KnearestResult<'a, T, N> {
    pub bot: &'a mut T,
    pub mag: N,
}

The dinotree's Num does not inherit any kind of arithmetic traits. This showcases that the tree construction and pair finding collision algorithms do not involves any arithmetic. However, when finding the nearest neighbor, we need to do some calculations to compute distance between points. So instead of giving the Num arithmetic and thus add uneeded bounds for general use of this tree, the user must provide functions for arithmetic specifically for this function. The user can also specify what the minimum distance function is minizing based off of. For example minimizing based off the square distance will give you the same answer as minimizing based off of the distant. The callback function will be called on the closest object, then the second closest, and so on up until k. User can also this way choose whether to use manhatan distance or not. Its important to distinguish the fact that there is no danger of any of the references returned being the same. The closest is guarenteed to be distinct from the second closest. That is not to say they they don't overlap in 2d space. Returned by k_nearest_mut

Fields

bot: &'a mut Tmag: N

Auto Trait Implementations

impl<'a, T, N> RefUnwindSafe for KnearestResult<'a, T, N> where
    N: RefUnwindSafe,
    T: RefUnwindSafe

impl<'a, T, N> Send for KnearestResult<'a, T, N> where
    N: Send,
    T: Send

impl<'a, T, N> Sync for KnearestResult<'a, T, N> where
    N: Sync,
    T: Sync

impl<'a, T, N> Unpin for KnearestResult<'a, T, N> where
    N: Unpin

impl<'a, T, N> !UnwindSafe for KnearestResult<'a, T, N>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.