pub struct BarcodeSummary {
pub total_persistence: f64,
pub n_long_features: usize,
pub entropy: f64,
pub max_persistence: f64,
pub n_essential: usize,
pub mean_persistence: f64,
}Expand description
Summary statistics derived from a persistence barcode.
Fields§
§total_persistence: f64Total persistence: Σ (death − birth) for finite pairs.
n_long_features: usizeNumber of features with persistence ≥ threshold.
entropy: f64Persistence entropy.
max_persistence: f64Maximum persistence over all finite pairs.
n_essential: usizeNumber of essential (infinite) features.
mean_persistence: f64Mean persistence of finite pairs; 0 if none.
Implementations§
Source§impl BarcodeSummary
impl BarcodeSummary
Sourcepub fn from_diagram(diagram: &PersistenceDiagram, long_threshold: f64) -> Self
pub fn from_diagram(diagram: &PersistenceDiagram, long_threshold: f64) -> Self
Compute a BarcodeSummary from a persistence diagram.
long_threshold determines the cutoff for “long” features.
Sourcepub fn normalised_total(&self) -> f64
pub fn normalised_total(&self) -> f64
Normalised total persistence: total / max (0 if max is 0).
Trait Implementations§
Source§impl Clone for BarcodeSummary
impl Clone for BarcodeSummary
Source§fn clone(&self) -> BarcodeSummary
fn clone(&self) -> BarcodeSummary
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 BarcodeSummary
impl RefUnwindSafe for BarcodeSummary
impl Send for BarcodeSummary
impl Sync for BarcodeSummary
impl Unpin for BarcodeSummary
impl UnsafeUnpin for BarcodeSummary
impl UnwindSafe for BarcodeSummary
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.