[][src]Struct flann::Index

pub struct Index<T: Indexable, N: ArrayLength<T>> { /* fields omitted */ }

Methods

impl<T: Indexable, N: ArrayLength<T>> Index<T, N>[src]

pub fn new<I>(points: I, parameters: Parameters) -> Result<Self, FlannError> where
    I: IntoIterator<Item = GenericArray<T, N>>, 
[src]

pub fn add(&mut self, point: GenericArray<T, N>)[src]

Adds a point to the index.

pub fn add_multiple<I>(&mut self, points: I) where
    I: IntoIterator<Item = GenericArray<T, N>>, 
[src]

Adds multiple points to the index.

pub fn get(&self, idx: usize) -> Option<&GenericArray<T, N>>[src]

Get the point that corresponds to this index idx.

pub fn remove(&mut self, idx: usize)[src]

Removes a point at index idx.

pub fn len(&self) -> usize[src]

pub fn is_empty(&self) -> bool[src]

pub fn find_nearest_neighbor(
    &mut self,
    point: &GenericArray<T, N>
) -> Neighbor<T::ResultType>
[src]

Performs a search to find only the closest neighbor.

pub fn find_nearest_neighbors(
    &mut self,
    num: usize,
    point: &GenericArray<T, N>
) -> impl Iterator<Item = Neighbor<T::ResultType>>
[src]

Performs k-NN search for num neighbors. If there are less points in the set than num it returns that many neighbors.

pub fn find_nearest_neighbors_radius(
    &mut self,
    num: usize,
    radius_squared: f32,
    point: &GenericArray<T, N>
) -> impl Iterator<Item = Neighbor<T::ResultType>>
[src]

Performs k-NN search for num neighbors. If there are less points in the set than num it returns that many neighbors.

pub fn find_many_nearest_neighbors(
    &mut self,
    num: usize,
    points: &[GenericArray<T, N>]
) -> IntoChunks<impl Iterator<Item = Neighbor<T::ResultType>>>
[src]

Performs k-NN search on num neighbors for several points.

If there are less points in the set than num it returns that many neighbors for each point.

Trait Implementations

impl<T: Indexable, N: ArrayLength<T>> Drop for Index<T, N>[src]

Auto Trait Implementations

impl<T, N> !Send for Index<T, N>

impl<T, N> !Sync for Index<T, N>

Blanket Implementations

impl<T> From for T[src]

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

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Same for T

type Output = T

Should always be Self