Struct vec_vp_tree::Neighbor
[−]
[src]
pub struct Neighbor<'t, T: 't> { pub item: &'t T, pub dist: u64, }
Wrapper of an item and a distance, returned by Neighbors
.
Fields
item: &'t T
The item that this entry concerns.
dist: u64
The distance between item
and the origin passed to VpTree::k_nearest()
.
Trait Implementations
impl<'t, T: Debug + 't> Debug for Neighbor<'t, T>
[src]
impl<'t, T: Clone + 't> Clone for Neighbor<'t, T>
[src]
fn clone(&self) -> Neighbor<'t, T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<'t, T: 't> PartialOrd for Neighbor<'t, T>
[src]
Returns the comparison of the distances only.
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<'t, T: 't> Ord for Neighbor<'t, T>
[src]
Returns the comparison of the distances only.
fn cmp(&self, other: &Self) -> Ordering
This method returns an Ordering
between self
and other
. Read more
impl<'t, T: 't> PartialEq for Neighbor<'t, T>
[src]
Returns the equality of the distances only.
fn eq(&self, other: &Self) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'t, T: 't> Eq for Neighbor<'t, T>
[src]
Returns the equality of the distances only.