Struct linfa_nn::BallTree [−][src]
pub struct BallTree;
Expand description
Implementation of ball tree, a space partitioning data structure that partitions its points
into nested hyperspheres called “balls”. It performs spatial queries in O(k * logN)
time,
where k
is the number of points returned by the query. Calling from_batch
returns a
BallTreeIndex
.
More details can be found here. This implementation is based off of the ball_tree crate.
Implementations
Trait Implementations
fn from_batch_with_leaf_size<'a, F: Float, DT: Data<Elem = F>, D: 'a + Distance<F>>(
&self,
batch: &'a ArrayBase<DT, Ix2>,
leaf_size: usize,
dist_fn: D
) -> Result<Box<dyn NearestNeighbourIndex<F> + 'a>, BuildError>
fn from_batch_with_leaf_size<'a, F: Float, DT: Data<Elem = F>, D: 'a + Distance<F>>(
&self,
batch: &'a ArrayBase<DT, Ix2>,
leaf_size: usize,
dist_fn: D
) -> Result<Box<dyn NearestNeighbourIndex<F> + 'a>, BuildError>
Builds a spatial index using a MxN two-dimensional array representing M points with N
dimensions. Also takes leaf_size
, which specifies the number of elements in the leaf
nodes of tree-like index structures. Read more
fn from_batch<'a, F: Float, DT: Data<Elem = F>, D: 'a + Distance<F>>(
&self,
batch: &'a ArrayBase<DT, Ix2>,
dist_fn: D
) -> Result<Box<dyn NearestNeighbourIndex<F> + 'a>, BuildError>
fn from_batch<'a, F: Float, DT: Data<Elem = F>, D: 'a + Distance<F>>(
&self,
batch: &'a ArrayBase<DT, Ix2>,
dist_fn: D
) -> Result<Box<dyn NearestNeighbourIndex<F> + 'a>, BuildError>
Builds a spatial index using a default leaf size. See from_batch_with_leaf_size
for more
information. Read more
Auto Trait Implementations
impl RefUnwindSafe for BallTree
impl UnwindSafe for BallTree
Blanket Implementations
Mutably borrows from an owned value. Read more