pub struct Barcode {
pub pairs: Vec<PersistencePair>,
pub betti_curve: Vec<(f64, Vec<usize>)>,
}Expand description
The full persistence barcode for all dimensions.
Fields§
§pairs: Vec<PersistencePair>§betti_curve: Vec<(f64, Vec<usize>)>Betti curve sampled at each unique filtration value: (epsilon, [β₀, β₁, β₂, …])
Implementations§
Source§impl Barcode
impl Barcode
Sourcepub fn compute(vr: &VietorisRipsComplex) -> Result<Self, PersistenceError>
pub fn compute(vr: &VietorisRipsComplex) -> Result<Self, PersistenceError>
Compute the barcode from a Vietoris-Rips complex.
Sourcepub fn pairs_of_dimension(&self, dim: usize) -> Vec<&PersistencePair>
pub fn pairs_of_dimension(&self, dim: usize) -> Vec<&PersistencePair>
Pairs filtered by dimension.
Sourcepub fn max_persistence(&self) -> f64
pub fn max_persistence(&self) -> f64
Maximum persistence value among finite pairs.
Sourcepub fn persistence_entropy(&self) -> f64
pub fn persistence_entropy(&self) -> f64
Persistence entropy: Shannon entropy of normalized persistence values.
Sourcepub fn betti_numbers_at(&self, eps: f64) -> Vec<usize>
pub fn betti_numbers_at(&self, eps: f64) -> Vec<usize>
Betti numbers at the given epsilon value.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Barcode
impl<'de> Deserialize<'de> for Barcode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Barcode
impl RefUnwindSafe for Barcode
impl Send for Barcode
impl Sync for Barcode
impl Unpin for Barcode
impl UnsafeUnpin for Barcode
impl UnwindSafe for Barcode
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