pub struct PersistenceDiagram {
pub pairs: Vec<BirthDeathPair>,
pub max_dim: usize,
}Expand description
Persistence diagram: collection of birth-death pairs
Fields§
§pairs: Vec<BirthDeathPair>Birth-death pairs
max_dim: usizeMaximum dimension
Implementations§
Source§impl PersistenceDiagram
impl PersistenceDiagram
Sourcepub fn add(&mut self, pair: BirthDeathPair)
pub fn add(&mut self, pair: BirthDeathPair)
Add a pair
Sourcepub fn pairs_of_dim(&self, d: usize) -> impl Iterator<Item = &BirthDeathPair>
pub fn pairs_of_dim(&self, d: usize) -> impl Iterator<Item = &BirthDeathPair>
Get pairs of dimension d
Sourcepub fn betti_at(&self, t: f64) -> BettiNumbers
pub fn betti_at(&self, t: f64) -> BettiNumbers
Get Betti numbers at scale t
Sourcepub fn total_persistence(&self) -> f64
pub fn total_persistence(&self) -> f64
Get total persistence (sum of lifetimes)
Sourcepub fn average_persistence(&self) -> f64
pub fn average_persistence(&self) -> f64
Get average persistence
Sourcepub fn filter_by_persistence(&self, min_persistence: f64) -> Self
pub fn filter_by_persistence(&self, min_persistence: f64) -> Self
Filter by minimum persistence
Sourcepub fn feature_counts(&self) -> Vec<usize>
pub fn feature_counts(&self) -> Vec<usize>
Number of features of each dimension
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 · 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
Auto Trait Implementations§
impl Freeze for PersistenceDiagram
impl RefUnwindSafe for PersistenceDiagram
impl Send for PersistenceDiagram
impl Sync for PersistenceDiagram
impl Unpin 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