[−][src]Struct kdtree::kdtree::KdTree
Methods
impl<A: Float + Zero + One, T, U: AsRef<[A]>> KdTree<A, T, U>
[src]
pub fn new(dims: usize) -> Self
[src]
pub fn with_capacity(dimensions: usize, capacity: usize) -> Self
[src]
pub fn size(&self) -> usize
[src]
pub fn nearest<F>(
&self,
point: &[A],
num: usize,
distance: &F
) -> Result<Vec<(A, &T)>, ErrorKind> where
F: Fn(&[A], &[A]) -> A,
[src]
&self,
point: &[A],
num: usize,
distance: &F
) -> Result<Vec<(A, &T)>, ErrorKind> where
F: Fn(&[A], &[A]) -> A,
pub fn within<F>(
&self,
point: &[A],
radius: A,
distance: &F
) -> Result<Vec<(A, &T)>, ErrorKind> where
F: Fn(&[A], &[A]) -> A,
[src]
&self,
point: &[A],
radius: A,
distance: &F
) -> Result<Vec<(A, &T)>, ErrorKind> where
F: Fn(&[A], &[A]) -> A,
pub fn iter_nearest<'a, 'b, F>(
&'b self,
point: &'a [A],
distance: &'a F
) -> Result<NearestIter<'a, 'b, A, T, U, F>, ErrorKind> where
F: Fn(&[A], &[A]) -> A,
[src]
&'b self,
point: &'a [A],
distance: &'a F
) -> Result<NearestIter<'a, 'b, A, T, U, F>, ErrorKind> where
F: Fn(&[A], &[A]) -> A,
pub fn iter_nearest_mut<'a, 'b, F>(
&'b mut self,
point: &'a [A],
distance: &'a F
) -> Result<NearestIterMut<'a, 'b, A, T, U, F>, ErrorKind> where
F: Fn(&[A], &[A]) -> A,
[src]
&'b mut self,
point: &'a [A],
distance: &'a F
) -> Result<NearestIterMut<'a, 'b, A, T, U, F>, ErrorKind> where
F: Fn(&[A], &[A]) -> A,
pub fn add(&mut self, point: U, data: T) -> Result<(), ErrorKind>
[src]
Trait Implementations
Auto Trait Implementations
impl<A, T, U> Send for KdTree<A, T, U> where
A: Send,
T: Send,
U: Send,
A: Send,
T: Send,
U: Send,
impl<A, T, U> Sync for KdTree<A, T, U> where
A: Sync,
T: Sync,
U: Sync,
A: Sync,
T: Sync,
U: Sync,
impl<A, T, U> Unpin for KdTree<A, T, U> where
A: Unpin,
T: Unpin,
U: Unpin,
A: Unpin,
T: Unpin,
U: Unpin,
impl<A, T, U> UnwindSafe for KdTree<A, T, U> where
A: UnwindSafe,
T: UnwindSafe,
U: UnwindSafe,
A: UnwindSafe,
T: UnwindSafe,
U: UnwindSafe,
impl<A, T, U> RefUnwindSafe for KdTree<A, T, U> where
A: RefUnwindSafe,
T: RefUnwindSafe,
U: RefUnwindSafe,
A: RefUnwindSafe,
T: RefUnwindSafe,
U: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,