Skip to main content

Points

Trait Points 

Source
pub trait Points {
    // Required methods
    fn matrix(&self) -> &DMatrix<f64>;
    fn matrix_mut(&mut self) -> &mut DMatrix<f64>;

    // Provided methods
    fn get(&self, index: usize) -> Option<DVectorView<'_, f64>> { ... }
    fn get_mut(&mut self, index: usize) -> Option<DVectorViewMut<'_, f64>> { ... }
    fn dimension(&self) -> usize { ... }
    fn count(&self) -> usize { ... }
    fn is_empty(&self) -> bool { ... }
}
Expand description

Common accessors for point sets stored as one column per point.

Required Methods§

Source

fn matrix(&self) -> &DMatrix<f64>

Returns the coordinate matrix holding one point per column.

Source

fn matrix_mut(&mut self) -> &mut DMatrix<f64>

Returns the mutable coordinate matrix holding one point per column.

Provided Methods§

Source

fn get(&self, index: usize) -> Option<DVectorView<'_, f64>>

Returns a view of the i-th point, or None if the index is out of range.

Source

fn get_mut(&mut self, index: usize) -> Option<DVectorViewMut<'_, f64>>

Returns a mutable view of the i-th point, or None if the index is out of range.

Source

fn dimension(&self) -> usize

Returns the dimension N of the points.

Source

fn count(&self) -> usize

Returns the number of points.

Source

fn is_empty(&self) -> bool

Returns whether there are no points.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§