[−][src]Struct flann::Index
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]
I: IntoIterator<Item = GenericArray<T, N>>,
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]
I: IntoIterator<Item = GenericArray<T, N>>,
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]
&mut self,
point: &GenericArray<T, N>
) -> Neighbor<T::ResultType>
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]
&mut self,
num: usize,
point: &GenericArray<T, N>
) -> impl Iterator<Item = Neighbor<T::ResultType>>
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]
&mut self,
num: usize,
radius_squared: f32,
point: &GenericArray<T, N>
) -> impl Iterator<Item = Neighbor<T::ResultType>>
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]
&mut self,
num: usize,
points: &[GenericArray<T, N>]
) -> IntoChunks<impl Iterator<Item = Neighbor<T::ResultType>>>
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
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Same for T
type Output = T
Should always be Self