pub struct PersistentBettiNumbers {
pub pairs: Vec<Vec<(f64, f64)>>,
}Expand description
Persistent Betti numbers at a given threshold.
Fields§
§pairs: Vec<Vec<(f64, f64)>>Persistence diagram: list of (birth, death) pairs per dimension.
Implementations§
Source§impl PersistentBettiNumbers
impl PersistentBettiNumbers
pub fn new(pairs: Vec<Vec<(f64, f64)>>) -> Self
Sourcepub fn betti_at(&self, k: usize, t: f64) -> usize
pub fn betti_at(&self, k: usize, t: f64) -> usize
Betti number β_k at threshold t: count of pairs (b,d) with b<=t<d.
Sourcepub fn total_persistence(&self, k: usize) -> f64
pub fn total_persistence(&self, k: usize) -> f64
Total persistence of dimension k: Σ (d - b).
Sourcepub fn bottleneck_approx(&self, other: &Self, k: usize) -> f64
pub fn bottleneck_approx(&self, other: &Self, k: usize) -> f64
Bottleneck distance approximation (naive, O(n^2)).
Trait Implementations§
Source§impl Clone for PersistentBettiNumbers
impl Clone for PersistentBettiNumbers
Source§fn clone(&self) -> PersistentBettiNumbers
fn clone(&self) -> PersistentBettiNumbers
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 moreAuto Trait Implementations§
impl Freeze for PersistentBettiNumbers
impl RefUnwindSafe for PersistentBettiNumbers
impl Send for PersistentBettiNumbers
impl Sync for PersistentBettiNumbers
impl Unpin for PersistentBettiNumbers
impl UnsafeUnpin for PersistentBettiNumbers
impl UnwindSafe for PersistentBettiNumbers
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