pub fn compute_persistence(
simplices: &[Simplex],
out_pairs: &mut [PersistencePair],
) -> Result<usize, TdaError>Expand description
Compute persistence pairs from a filtration using a simple boundary matrix reduction.
This is a standard persistence algorithm: for each simplex in filtration order, reduce its boundary column until the lowest 1 is unique or the column is zero. A non-zero reduced column gives a persistence pair.
out_pairs needs n_simplices entries.
Returns the number of persistence pairs found.