Skip to main content

SparseRipsComplex

Struct SparseRipsComplex 

Source
pub struct SparseRipsComplex {
    pub max_radius: f64,
    pub epsilon: f64,
    /* private fields */
}
Expand description

Sparse Vietoris-Rips complex builder

Fields§

§max_radius: f64

Maximum filtration radius

§epsilon: f64

User-facing sparsification parameter (controls how many distant edges to skip)

Implementations§

Source§

impl SparseRipsComplex

Source

pub fn new(epsilon: f64, max_radius: f64) -> Self

Source

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.

Source

pub fn compute_h0( &self, n_points: usize, edges: &[SimplexEdge], ) -> Vec<PersistenceBar>

Compute H0 persistence (connected components) from sparse 1-skeleton.

Source

pub fn compute(&self, points: &[Vec<f64>]) -> PersistenceDiagram

Full sparse persistent homology pipeline (H0 + approximate H1).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.