open class PackedRipserCohomologyEngine[CoefficientT](metricSpace: FiniteMetricSpace[Int], maxDimension: Int, useApparentPairs: Boolean = ..., maxFiltrationValue: Option[Double] = ..., neighbourLists: Option[Boolean] = ..., wideIndices: Option[Boolean] = ..., useEmergentPairs: Boolean = ..., useUnionFind: Boolean = ...)(using evidence$1: Field { type Self = CoefficientT; })
Persistent cohomology of the Vietoris-Rips complex of a metric space by Bauer's Ripser algorithm (arXiv:1908.02518): the fast engine for Vietoris-Rips, and the MATLAB/CLI default there. Cells are packed as (diameter, combinatorial index) pairs (DiameterIndex, Ripser's diameter_index_t); clearing, apparent pairs, emergent pairs and the enclosing-radius cutoff as in Ripser.
Reports degrees 0 .. maxDimension, each bar with its representative cocycle over DiameterIndex cells: decode a cell of a degree-k bar with vertices(cell, k + 1). maxFiltrationValue defaults to the minimum enclosing radius, past which nothing new is born. useApparentPairs = false, useEmergentPairs = false and useUnionFind = false turn off the apparent-pair shortcut, the emergent-pair shortcut and the pairing of degree 0 by union-find over the edges (the elder rule, as Ripser does it), which change no output (for benchmarking). An emergent pair is a column whose oldest cofacet of the same diameter is the pivot of no earlier column: it is paired with that cofacet without being reduced, and kept only as the simplex that makes it (rebuilt if a later column needs it), which saves the memory of its stored column.
Under a threshold that keeps few of the pairs (a large point cloud with a small maxFiltrationValue), cofacets are found from each vertex's list of neighbours within the threshold instead of by trying every vertex, as Ripser does with a sparse distance matrix. The lists are built when at most a quarter of all pairs are within the threshold (neighbourLists = Some(true) or Some(false) decides it instead); the output is the same either way.
The combinatorial index of a simplex is one Long while the indices of every simplex up to dimension maxDimension + 1 fit in one, and two words (WideSimplexIndexing, up to 126 bits) beyond: for 16,000 points to degree 3, or 122,000 to degree 2. The choice is made before the run (wideIndices decides it instead) and changes no output.
open class DiameterIndex(val diameter: Double, val index: Long)
A simplex as its (diameter, combinatorial index): the cell type of the returned chains. The index is one Long while that holds it. With two-word indices (usesWideIndices) a cell whose index passes 63 bits is a WideDiameterIndex, which also holds high, the bits above the low 63 that index keeps; every other cell has high = 0 and no second word in memory. Decode with vertices. Equality and hash use the index alone (both words), so the same simplex reached by different floating-point paths is one key.
A simplex as its (diameter, combinatorial index): the cell type of the returned chains. The index is one Long while that holds it. With two-word indices (usesWideIndices) a cell whose index passes 63 bits is a WideDiameterIndex, which also holds high, the bits above the low 63 that index keeps; every other cell has high = 0 and no second word in memory. Decode with vertices. Equality and hash use the index alone (both words), so the same simplex reached by different floating-point paths is one key.
How many simplices of degrees 1 and up the last run paired directly as apparent pairs, without reducing their coboundary (degree 0 is paired by union-find).
How many simplices of degrees 1 and up the last run paired directly as apparent pairs, without reducing their coboundary (degree 0 is paired by union-find).
The coboundary of sigma (with size vertices) in the complex truncated at maxFiltrationValue, as in RipserCohomologyEngine.coboundaryOf. Defined up to dimension maxDimension.
The coboundary of sigma (with size vertices) in the complex truncated at maxFiltrationValue, as in RipserCohomologyEngine.coboundaryOf. Defined up to dimension maxDimension.
How many simplices of degrees 1 and up the last run paired as emergent pairs: their oldest same-diameter cofacet was no earlier column's pivot, so the coboundary was already reduced and was never put on the working column.
How many simplices of degrees 1 and up the last run paired as emergent pairs: their oldest same-diameter cofacet was no earlier column's pivot, so the coboundary was already reduced and was never put on the working column.
The longest edge within the threshold, read off the neighbour lists when the engine has them (0.0 when there is none), else None: the number FiniteMetricSpace.longestDistanceWithin finds with a pass of its own.
The longest edge within the threshold, read off the neighbour lists when the engine has them (0.0 when there is none), else None: the number FiniteMetricSpace.longestDistanceWithin finds with a pass of its own.
Every bar, zero-length ones included, with the cells that open and close it. Cocycles are built only where asked (representative is None elsewhere): with cocycles = false none, with zeroLengthCocycles = false none for zero-length bars. The pairing never depends on them.
Every bar, zero-length ones included, with the cells that open and close it. Cocycles are built only where asked (representative is None elsewhere): with cocycles = false none, with zeroLengthCocycles = false none for zero-length bars. The pairing never depends on them.
Every bar of degree 0 .. maxDimension, each with its representative cocycle (over DiameterIndex cells; decode with si); zero-length bars only if includeZeroLength.
Every bar of degree 0 .. maxDimension, each with its representative cocycle (over DiameterIndex cells; decode with si); zero-length bars only if includeZeroLength.
The same bars with '''cycles''' as representatives (over DiameterIndex cells): the pairing comes from the cohomology computation, and only the boundary columns of the death simplices are reduced (Involution).
The same bars with '''cycles''' as representatives (over DiameterIndex cells): the pairing comes from the cohomology computation, and only the boundary columns of the death simplices are reduced (Involution).
The combinatorial number system of this metric space's simplices with one-word indices. Decode the cells of returned chains with vertices, which also reads two-word indices.
The combinatorial number system of this metric space's simplices with one-word indices. Decode the cells of returned chains with vertices, which also reads two-word indices.