pub struct SparseRipsComplex {
pub max_radius: f64,
pub epsilon: f64,
/* private fields */
}Expand description
Sparse Vietoris-Rips complex builder
Fields§
§max_radius: f64Maximum filtration radius
epsilon: f64User-facing sparsification parameter (controls how many distant edges to skip)
Implementations§
Source§impl SparseRipsComplex
impl SparseRipsComplex
pub fn new(epsilon: f64, max_radius: f64) -> Self
Sourcepub fn sparse_1_skeleton(&self, points: &[Vec<f64>]) -> Vec<SimplexEdge>
pub fn sparse_1_skeleton(&self, points: &[Vec<f64>]) -> Vec<SimplexEdge>
Build sparse 1-skeleton (edges) for filtration. Uses PPR to select only the ε-dense neighborhood, skipping distant edges.
Sourcepub fn compute_h0(
&self,
n_points: usize,
edges: &[SimplexEdge],
) -> Vec<PersistenceBar>
pub fn compute_h0( &self, n_points: usize, edges: &[SimplexEdge], ) -> Vec<PersistenceBar>
Compute H0 persistence (connected components) from sparse 1-skeleton.
Sourcepub fn compute(&self, points: &[Vec<f64>]) -> PersistenceDiagram
pub fn compute(&self, points: &[Vec<f64>]) -> PersistenceDiagram
Full sparse persistent homology pipeline (H0 + approximate H1).
Auto Trait Implementations§
impl Freeze for SparseRipsComplex
impl RefUnwindSafe for SparseRipsComplex
impl Send for SparseRipsComplex
impl Sync for SparseRipsComplex
impl Unpin for SparseRipsComplex
impl UnsafeUnpin for SparseRipsComplex
impl UnwindSafe for SparseRipsComplex
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