pub struct PersistenceDiagram {
pub pairs: Vec<PersistentInterval>,
}Expand description
A persistence diagram: a collection of birth-death pairs.
Each pair represents a topological feature that appears at birth and
disappears at death in a filtration.
Fields§
§pairs: Vec<PersistentInterval>The birth-death pairs (birth, death, dimension).
Implementations§
Source§impl PersistenceDiagram
impl PersistenceDiagram
Sourcepub fn add(&mut self, birth: f64, death: f64, dimension: usize)
pub fn add(&mut self, birth: f64, death: f64, dimension: usize)
Add a birth-death pair to the diagram.
Sourcepub fn from_vietoris_rips_h0(vr: &VietorisRips) -> Self
pub fn from_vietoris_rips_h0(vr: &VietorisRips) -> Self
Build a persistence diagram from the 0-dimensional VR filtration.
Sourcepub fn pairs_in_dim(&self, dim: usize) -> Vec<&PersistentInterval>
pub fn pairs_in_dim(&self, dim: usize) -> Vec<&PersistentInterval>
Filter pairs by homological dimension.
Sourcepub fn max_persistence(&self) -> f64
pub fn max_persistence(&self) -> f64
Maximum persistence (lifetime) over all finite pairs.
Sourcepub fn n_essential(&self) -> usize
pub fn n_essential(&self) -> usize
Number of essential (infinite) bars.
Sourcepub fn total_persistence(&self) -> f64
pub fn total_persistence(&self) -> f64
Total persistence Σ (death − birth) for finite pairs.
Trait Implementations§
Source§impl Clone for PersistenceDiagram
impl Clone for PersistenceDiagram
Source§fn clone(&self) -> PersistenceDiagram
fn clone(&self) -> PersistenceDiagram
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 moreSource§impl Debug for PersistenceDiagram
impl Debug for PersistenceDiagram
Source§impl Default for PersistenceDiagram
impl Default for PersistenceDiagram
Source§fn default() -> PersistenceDiagram
fn default() -> PersistenceDiagram
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PersistenceDiagram
impl RefUnwindSafe for PersistenceDiagram
impl Send for PersistenceDiagram
impl Sync for PersistenceDiagram
impl Unpin for PersistenceDiagram
impl UnsafeUnpin for PersistenceDiagram
impl UnwindSafe for PersistenceDiagram
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.