Trait pointcloud::PointCloud [−][src]
pub trait PointCloud: Send + Sync + 'static { type Point: ?Sized; type PointRef: Deref<Target = Self::Point> + PointRef; type Metric: Metric<Self::Point>; type Label: ?Sized + Serialize; type LabelSummary: Summary<Label = Self::Label>; type Metadata: ?Sized + Serialize; type MetaSummary: Summary<Label = Self::Metadata>;}Show methods
fn metadata(&self, pn: usize) -> PointCloudResult<Option<&Self::Metadata>>; fn metasummary(
&self,
pns: &[usize]
) -> PointCloudResult<SummaryCounter<Self::MetaSummary>>; fn label(&self, pn: usize) -> PointCloudResult<Option<&Self::Label>>; fn label_summary(
&self,
pns: &[usize]
) -> PointCloudResult<SummaryCounter<Self::LabelSummary>>; fn name(&self, pi: usize) -> PointCloudResult<String>; fn index(&self, pn: &str) -> PointCloudResult<usize>; fn names(&self) -> Vec<String>; fn len(&self) -> usize; fn is_empty(&self) -> bool; fn dim(&self) -> usize; fn reference_indexes(&self) -> Vec<usize>; fn point<'a, 'b: 'a>(&'b self, i: usize) -> PointCloudResult<Self::PointRef>; fn point_dense_array(&self, index: usize) -> PointCloudResult<Array1<f32>> { ... } fn points_dense_matrix(
&self,
indexes: &[usize]
) -> PointCloudResult<Array2<f32>> { ... } fn distances_to_point_index(
&self,
i: usize,
indexes: &[usize]
) -> PointCloudResult<Vec<f32>> { ... } fn distances_to_point<T: Deref<Target = Self::Point> + Send + Sync>(
&self,
x: &T,
indexes: &[usize]
) -> PointCloudResult<Vec<f32>> { ... } fn moment_1(&self, indexes: &[usize]) -> PointCloudResult<Vec<f32>>
where
f32: AddAssign, { ... } fn moment_2(&self, indexes: &[usize]) -> PointCloudResult<Vec<f32>>
where
f32: Mul<Output = f32> + AddAssign, { ... }
Base trait for a point cloud
Associated Types
type Point: ?Sized
[src]
The derefrenced, raw point. Think f32
type PointRef: Deref<Target = Self::Point> + PointRef
[src]
A reference to a point. Think &’a f32
It might be better to move this to the point
function, but this way we can rely on it for other things.
type Metric: Metric<Self::Point>
[src]
The metric this pointcloud is bound to. Think L2
type Label: ?Sized + Serialize
[src]
The label type. Summary of a set of labels
type LabelSummary: Summary<Label = Self::Label>
[src]
Summary of a set of labels
type Metadata: ?Sized + Serialize
[src]
Underlying metadata
type MetaSummary: Summary<Label = Self::Metadata>
[src]
A summary of the underlying metadata
Required methods
fn metadata(&self, pn: usize) -> PointCloudResult<Option<&Self::Metadata>>
[src]
Expensive metadata object for the sample
fn metasummary(
&self,
pns: &[usize]
) -> PointCloudResult<SummaryCounter<Self::MetaSummary>>
[src]
&self,
pns: &[usize]
) -> PointCloudResult<SummaryCounter<Self::MetaSummary>>
Expensive metadata summary over the samples
fn label(&self, pn: usize) -> PointCloudResult<Option<&Self::Label>>
[src]
Grabs a label reference. Supports errors (the label could be remote), and partially labeled datasets with the option.
fn label_summary(
&self,
pns: &[usize]
) -> PointCloudResult<SummaryCounter<Self::LabelSummary>>
[src]
&self,
pns: &[usize]
) -> PointCloudResult<SummaryCounter<Self::LabelSummary>>
Grabs a label summary of a set of indexes.
fn name(&self, pi: usize) -> PointCloudResult<String>
[src]
Grabs the name of the point. Returns an error if the access errors out, and a None if the name is unknown
fn index(&self, pn: &str) -> PointCloudResult<usize>
[src]
Converts a name to an index you can use
fn names(&self) -> Vec<String>
[src]
Gather’s all valid known names
fn len(&self) -> usize
[src]
The number of samples this cloud covers
fn is_empty(&self) -> bool
[src]
If this is empty
fn dim(&self) -> usize
[src]
The dimension of the underlying data
fn reference_indexes(&self) -> Vec<usize>
[src]
Indexes used for access
fn point<'a, 'b: 'a>(&'b self, i: usize) -> PointCloudResult<Self::PointRef>
[src]
Gets a point from this dataset
Provided methods
fn point_dense_array(&self, index: usize) -> PointCloudResult<Array1<f32>>
[src]
Returns a dense array
fn points_dense_matrix(
&self,
indexes: &[usize]
) -> PointCloudResult<Array2<f32>>
[src]
&self,
indexes: &[usize]
) -> PointCloudResult<Array2<f32>>
Returns a dense array
fn distances_to_point_index(
&self,
i: usize,
indexes: &[usize]
) -> PointCloudResult<Vec<f32>>
[src]
&self,
i: usize,
indexes: &[usize]
) -> PointCloudResult<Vec<f32>>
The main distance function. This paralizes if there are more than 100 points.
fn distances_to_point<T: Deref<Target = Self::Point> + Send + Sync>(
&self,
x: &T,
indexes: &[usize]
) -> PointCloudResult<Vec<f32>>
[src]
&self,
x: &T,
indexes: &[usize]
) -> PointCloudResult<Vec<f32>>
The main distance function. This paralizes if there are more than 100 points.
fn moment_1(&self, indexes: &[usize]) -> PointCloudResult<Vec<f32>> where
f32: AddAssign,
[src]
f32: AddAssign,
The first moment of the specified vectors. See wikipedia.
fn moment_2(&self, indexes: &[usize]) -> PointCloudResult<Vec<f32>> where
f32: Mul<Output = f32> + AddAssign,
[src]
f32: Mul<Output = f32> + AddAssign,
The second moment of the specified vectors. See wikipedia.
Implementors
impl<D: PointCloud> PointCloud for HashGluedCloud<D>
[src]
impl<D: PointCloud> PointCloud for HashGluedCloud<D>
[src]type Metric = D::Metric
type Point = D::Point
type PointRef = D::PointRef
type Label = D::Label
type LabelSummary = D::LabelSummary
type Metadata = D::Metadata
type MetaSummary = D::MetaSummary
fn point<'a, 'b: 'a>(&'b self, pi: usize) -> PointCloudResult<Self::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<usize>
[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
fn label(&self, pn: usize) -> PointCloudResult<Option<&Self::Label>>
[src]
fn label_summary(
&self,
pns: &[usize]
) -> PointCloudResult<SummaryCounter<Self::LabelSummary>>
[src]
&self,
pns: &[usize]
) -> PointCloudResult<SummaryCounter<Self::LabelSummary>>
fn name(&self, pi: usize) -> PointCloudResult<String>
[src]
fn index(&self, pn: &str) -> PointCloudResult<usize>
[src]
fn names(&self) -> Vec<String>
[src]
fn metadata(&self, pn: usize) -> PointCloudResult<Option<&Self::Metadata>>
[src]
fn metasummary(
&self,
pns: &[usize]
) -> PointCloudResult<SummaryCounter<Self::MetaSummary>>
[src]
&self,
pns: &[usize]
) -> PointCloudResult<SummaryCounter<Self::MetaSummary>>
impl<D: PointCloud, L: LabelSet> PointCloud for SimpleLabeledCloud<D, L>
[src]
impl<D: PointCloud, L: LabelSet> PointCloud for SimpleLabeledCloud<D, L>
[src]type Metric = D::Metric
Underlying metric this point cloud uses
type Point = D::Point
type PointRef = D::PointRef
type Metadata = D::Metadata
type MetaSummary = D::MetaSummary
type Label = L::Label
type LabelSummary = L::LabelSummary
fn dim(&self) -> usize
[src]
fn len(&self) -> usize
[src]
fn is_empty(&self) -> bool
[src]
fn reference_indexes(&self) -> Vec<usize>
[src]
fn point<'a, 'b: 'a>(&'b self, i: usize) -> PointCloudResult<Self::PointRef>
[src]
fn metadata(&self, pn: usize) -> PointCloudResult<Option<&Self::Metadata>>
[src]
fn metasummary(
&self,
pns: &[usize]
) -> PointCloudResult<SummaryCounter<Self::MetaSummary>>
[src]
&self,
pns: &[usize]
) -> PointCloudResult<SummaryCounter<Self::MetaSummary>>
Expensive metadata summary over the samples
fn label(&self, pn: usize) -> PointCloudResult<Option<&Self::Label>>
[src]
Grabs a label reference. Supports errors (the label could be remote), and partially labeled datasets with the option.
fn label_summary(
&self,
pns: &[usize]
) -> PointCloudResult<SummaryCounter<Self::LabelSummary>>
[src]
&self,
pns: &[usize]
) -> PointCloudResult<SummaryCounter<Self::LabelSummary>>
Grabs a label summary of a set of indexes.
fn name(&self, pi: usize) -> PointCloudResult<String>
[src]
Grabs the name of the point. Returns an error if the access errors out, and a None if the name is unknown
fn index(&self, pn: &str) -> PointCloudResult<usize>
[src]
Converts a name to an index you can use
fn names(&self) -> Vec<String>
[src]
Gather’s all valid known names
impl<D: PointCloud, N: NamedSet> PointCloud for SimpleNamedCloud<D, N>
[src]
impl<D: PointCloud, N: NamedSet> PointCloud for SimpleNamedCloud<D, N>
[src]type Metric = D::Metric
Underlying metric this point cloud uses
type Point = D::Point
type PointRef = D::PointRef
type Metadata = D::Metadata
type MetaSummary = D::MetaSummary
type Label = D::Label
type LabelSummary = D::LabelSummary
fn dim(&self) -> usize
[src]
fn len(&self) -> usize
[src]
fn is_empty(&self) -> bool
[src]
fn reference_indexes(&self) -> Vec<usize>
[src]
fn point<'a, 'b: 'a>(&'b self, i: usize) -> PointCloudResult<Self::PointRef>
[src]
fn metadata(&self, pn: usize) -> PointCloudResult<Option<&Self::Metadata>>
[src]
fn metasummary(
&self,
pns: &[usize]
) -> PointCloudResult<SummaryCounter<Self::MetaSummary>>
[src]
&self,
pns: &[usize]
) -> PointCloudResult<SummaryCounter<Self::MetaSummary>>
Expensive metadata summary over the samples
fn label(&self, pn: usize) -> PointCloudResult<Option<&Self::Label>>
[src]
Grabs a label reference. Supports errors (the label could be remote), and partially labeled datasets with the option.
fn label_summary(
&self,
pns: &[usize]
) -> PointCloudResult<SummaryCounter<Self::LabelSummary>>
[src]
&self,
pns: &[usize]
) -> PointCloudResult<SummaryCounter<Self::LabelSummary>>
Grabs a label summary of a set of indexes.
fn name(&self, pi: usize) -> PointCloudResult<String>
[src]
Grabs the name of the point. Returns an error if the access errors out, and a None if the name is unknown
fn index(&self, pn: &str) -> PointCloudResult<usize>
[src]
Converts a name to an index you can use
fn names(&self) -> Vec<String>
[src]
Gather’s all valid known names