[][src]Trait pointcloud::PointCloud

pub trait PointCloud: Debug + Send + Sync + 'static {
    type Metric: Metric;
    fn len(&self) -> usize;
fn is_empty(&self) -> bool;
fn dim(&self) -> usize;
fn reference_indexes(&self) -> Vec<PointIndex>;
fn point(&self, pn: PointIndex) -> PointCloudResult<PointRef>; fn distances_to_point_indices(
        &self,
        is: &[PointIndex],
        js: &[PointIndex]
    ) -> PointCloudResult<Vec<f32>> { ... }
fn distances_to_point_index(
        &self,
        i: PointIndex,
        indexes: &[PointIndex]
    ) -> PointCloudResult<Vec<f32>> { ... }
fn distances_to_point<'a, T: Into<PointRef<'a>>>(
        &self,
        point: T,
        indexes: &[PointIndex]
    ) -> PointCloudResult<Vec<f32>> { ... }
fn moment_subset(
        &self,
        moment: i32,
        indexes: &[PointIndex]
    ) -> PointCloudResult<Vec<f32>> { ... }
fn partial_adjacency_matrix(
        &self,
        is: &[PointIndex],
        js: &[PointIndex]
    ) -> PointCloudResult<AdjMatrix> { ... }
fn adjacency_matrix(
        &self,
        indexes: &[PointIndex]
    ) -> PointCloudResult<AdjMatrix> { ... } }

Base trait for a point cloud

Associated Types

type Metric: Metric

Underlying metric this point cloud uses

Loading content...

Required methods

fn len(&self) -> usize

The number of samples this cloud covers

fn is_empty(&self) -> bool

If this is empty

fn dim(&self) -> usize

The dimension of the underlying data

fn reference_indexes(&self) -> Vec<PointIndex>

Indexes used for access

fn point(&self, pn: PointIndex) -> PointCloudResult<PointRef>

Gets a point from this dataset

Loading content...

Provided methods

fn distances_to_point_indices(
    &self,
    is: &[PointIndex],
    js: &[PointIndex]
) -> PointCloudResult<Vec<f32>>

The main distance function. This paralizes if there are more than 100 points.

fn distances_to_point_index(
    &self,
    i: PointIndex,
    indexes: &[PointIndex]
) -> PointCloudResult<Vec<f32>>

The main distance function. This paralizes if there are more than 100 points.

fn distances_to_point<'a, T: Into<PointRef<'a>>>(
    &self,
    point: T,
    indexes: &[PointIndex]
) -> PointCloudResult<Vec<f32>>

The main distance function. This paralizes if there are more than 100 points.

fn moment_subset(
    &self,
    moment: i32,
    indexes: &[PointIndex]
) -> PointCloudResult<Vec<f32>>

The main distance function. This paralizes if there are more than 100 points.

fn partial_adjacency_matrix(
    &self,
    is: &[PointIndex],
    js: &[PointIndex]
) -> PointCloudResult<AdjMatrix>

The main distance function. This paralizes if there are more than 100 points.

fn adjacency_matrix(
    &self,
    indexes: &[PointIndex]
) -> PointCloudResult<AdjMatrix>

Returns a sparse adj matrix for the given points.

Loading content...

Implementors

impl<D: PointCloud> PointCloud for HashGluedCloud<D>[src]

type Metric = D::Metric

fn point(&self, pn: PointIndex) -> PointCloudResult<PointRef>[src]

Returns a slice corresponding to the point in question. Used for rarely referenced points, like outliers or leaves.

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

Total number of points in the point cloud

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

Total number of points in the point cloud

fn reference_indexes(&self) -> Vec<PointIndex>[src]

The names of the data are currently a shallow wrapper around a usize.

fn dim(&self) -> usize[src]

Dimension of the data in the point cloud

impl<D: PointCloud, L: LabelSet> PointCloud for SimpleLabeledCloud<D, L>[src]

type Metric = D::Metric

Loading content...