pub struct VietorisRipsComplex {
pub simplices: Vec<Vec<usize>>,
pub filtration_values: Vec<f64>,
pub max_dimension: usize,
}Expand description
A Vietoris-Rips complex built from a point cloud. Simplices are added as epsilon grows — a k-simplex [v0,…,vk] appears at the maximum pairwise distance among its vertices.
Fields§
§simplices: Vec<Vec<usize>>§filtration_values: Vec<f64>§max_dimension: usizeImplementations§
Source§impl VietorisRipsComplex
impl VietorisRipsComplex
Sourcepub fn build(
cloud: &PointCloud,
max_dimension: usize,
max_eps: f64,
) -> Result<Self, PersistenceError>
pub fn build( cloud: &PointCloud, max_dimension: usize, max_eps: f64, ) -> Result<Self, PersistenceError>
Build the Vietoris-Rips complex up to max_dimension.
For large point clouds you can pass max_eps to prune simplices whose
filtration value exceeds it; pass f64::INFINITY to include everything.
pub fn n_simplices(&self) -> usize
Sourcepub fn simplex_dimension(&self, idx: usize) -> usize
pub fn simplex_dimension(&self, idx: usize) -> usize
Return the dimension of a simplex at given index.
Sourcepub fn simplices_of_dimension(&self, dim: usize) -> Vec<usize>
pub fn simplices_of_dimension(&self, dim: usize) -> Vec<usize>
Indices of all simplices of a given dimension.
Sourcepub fn sorted_filtration(&self) -> Vec<(usize, usize)>
pub fn sorted_filtration(&self) -> Vec<(usize, usize)>
All (dimension, simplex-index) pairs sorted by filtration value then dimension.
Trait Implementations§
Source§impl Clone for VietorisRipsComplex
impl Clone for VietorisRipsComplex
Source§fn clone(&self) -> VietorisRipsComplex
fn clone(&self) -> VietorisRipsComplex
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for VietorisRipsComplex
impl RefUnwindSafe for VietorisRipsComplex
impl Send for VietorisRipsComplex
impl Sync for VietorisRipsComplex
impl Unpin for VietorisRipsComplex
impl UnsafeUnpin for VietorisRipsComplex
impl UnwindSafe for VietorisRipsComplex
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more