Struct kdtree::kdtree::KdTree
[−]
[src]
pub struct KdTree<A, T, U: AsRef<[A]>> { /* fields omitted */ }
Methods
impl<A: Float + Zero + One + Zero + One, T, U: AsRef<[A]>> KdTree<A, T, U>
[src]
pub fn new(dims: usize) -> Self
[src]
pub fn new_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],
ridius: A,
distance: &F
) -> Result<Vec<(A, &T)>, ErrorKind> where
F: Fn(&[A], &[A]) -> A,
[src]
&self,
point: &[A],
ridius: 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,