[−][src]Struct dinotree_alg::query::KnearestResult
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 T
mag: N
Auto Trait Implementations
impl<'a, T, N> RefUnwindSafe for KnearestResult<'a, T, N> where
N: RefUnwindSafe,
T: RefUnwindSafe,
N: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, T, N> Send for KnearestResult<'a, T, N> where
N: Send,
T: Send,
N: Send,
T: Send,
impl<'a, T, N> Sync for KnearestResult<'a, T, N> where
N: Sync,
T: Sync,
N: Sync,
T: Sync,
impl<'a, T, N> Unpin for KnearestResult<'a, T, N> where
N: Unpin,
N: Unpin,
impl<'a, T, N> !UnwindSafe for KnearestResult<'a, T, N>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,