[][src]Struct kdtree::kdtree::KdTree

pub struct KdTree<A, T, U: AsRef<[A]>> { /* fields omitted */ }

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]

pub fn within<F>(
    &self,
    point: &[A],
    radius: A,
    distance: &F
) -> Result<Vec<(A, &T)>, ErrorKind> where
    F: Fn(&[A], &[A]) -> A, 
[src]

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]

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]

pub fn add(&mut self, point: U, data: T) -> Result<(), ErrorKind>[src]

Trait Implementations

impl<A: Debug, T: Debug, U: Debug + AsRef<[A]>> Debug for KdTree<A, T, U>[src]

Auto Trait Implementations

impl<A, T, U> Send for KdTree<A, T, U> where
    A: Send,
    T: Send,
    U: Send

impl<A, T, U> Sync for KdTree<A, T, U> where
    A: Sync,
    T: Sync,
    U: Sync

impl<A, T, U> Unpin for KdTree<A, T, U> where
    A: Unpin,
    T: Unpin,
    U: Unpin

impl<A, T, U> UnwindSafe for KdTree<A, T, U> where
    A: UnwindSafe,
    T: UnwindSafe,
    U: UnwindSafe

impl<A, T, U> RefUnwindSafe for KdTree<A, T, U> where
    A: RefUnwindSafe,
    T: RefUnwindSafe,
    U: RefUnwindSafe

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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