RipserCohomologyEngine

org.appliedtopology.tda4j.RipserCohomologyEngine
open class RipserCohomologyEngine[CoefficientT](metricSpace: FiniteMetricSpace[Int], maxDimension: Int, useApparentPairs: Boolean = ..., maxFiltrationValue: Option[Double] = ..., memoizeFiltrationValue: 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), on materialized Simplex[Int] cells indexed by the combinatorial number system (SimplexIndexing). A reference implementation: PackedRipserCohomologyEngine runs the same algorithm on packed cells and is the one to use; this one exists to cross-check it.

Reports degrees 0 .. maxDimension, each bar with its representative cocycle. Uses clearing (required for correctness here, not only speed) and skips the reduction of apparent pairs (Definition 3.2), which changes no output; useApparentPairs = false turns that off for benchmarking.

maxFiltrationValue defaults to the minimum enclosing radius, past which the complex is a cone and nothing new is born, so the barcode is the same as untruncated. memoizeFiltrationValue caches every diameter it computes (faster, more memory); off by default.

Attributes

Experimental
true
Source
RipserCohomology.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Type members

Classlikes

object cohomologyOrdering extends Ordering[Simplex[Int]]

The cohomology order: ascending by diameter, ties broken so a larger combinatorial index is older (the refinement Definition 3.2 relies on). A chain's leading cell is its minimum under this order, so the pivot of a reduced coboundary is its oldest cofacet.

The cohomology order: ascending by diameter, ties broken so a larger combinatorial index is older (the refinement Definition 3.2 relies on). A chain's leading cell is its minimum under this order, so the pivot of a reduced coboundary is its oldest cofacet.

Attributes

Source
RipserCohomology.scala
Supertypes
trait Ordering[Simplex[Int]]
trait PartialOrdering[Simplex[Int]]
trait Equiv[Simplex[Int]]
trait Serializable
trait Comparator[Simplex[Int]]
class Object
trait Matchable
class Any
Show all
Self type

Value members

Concrete methods

How many simplices the last run paired directly as apparent pairs, without reducing their coboundary.

How many simplices the last run paired directly as apparent pairs, without reducing their coboundary.

Attributes

Source
RipserCohomology.scala
def coboundaryOf(sigma: Simplex[Int]): Chain[Simplex[Int], CoefficientT]

The coboundary of sigma in the complex truncated at maxFiltrationValue. Defined up to sigma.dim == maxDimension: the (maxDimension + 1)-simplices are enumerated here as needed, so the top reported degree is resolved correctly, but never reduced as columns of their own. The sign of tau = sigma + v is (-1)^k, k the number of vertices of sigma below v (dual to Simplex's boundary).

The coboundary of sigma in the complex truncated at maxFiltrationValue. Defined up to sigma.dim == maxDimension: the (maxDimension + 1)-simplices are enumerated here as needed, so the top reported degree is resolved correctly, but never reduced as columns of their own. The sign of tau = sigma + v is (-1)^k, k the number of vertices of sigma below v (dual to Simplex's boundary).

Attributes

Source
RipserCohomology.scala
def coboundaryOfChain(c: Chain[Simplex[Int], CoefficientT]): Chain[Simplex[Int], CoefficientT]

The coboundary of a chain, extending coboundaryOf linearly: coboundaryOfChain(rep).isZero() checks that an essential bar's representative is a cocycle.

The coboundary of a chain, extending coboundaryOf linearly: coboundaryOfChain(rep).isZero() checks that an essential bar's representative is a cocycle.

Attributes

Source
RipserCohomology.scala
def persistentCohomology(includeZeroLength: Boolean = ...): List[PersistenceBar[Double, Chain[Simplex[Int], CoefficientT]]]

Every bar of degree 0 .. maxDimension, each with its representative cocycle; zero-length bars only if includeZeroLength.

Every bar of degree 0 .. maxDimension, each with its representative cocycle; zero-length bars only if includeZeroLength.

Attributes

Source
RipserCohomology.scala

How many times the last persistentCohomology() substituted an apparent pair's column during another column's reduction (for tests).

How many times the last persistentCohomology() substituted an apparent pair's column during another column's reduction (for tests).

Attributes

Source
RipserCohomology.scala

How many simplices the last persistentCohomology() assembled, over all dimensions (for tests).

How many simplices the last persistentCohomology() assembled, over all dimensions (for tests).

Attributes

Source
RipserCohomology.scala

Concrete fields

val filtrationValue: PartialFunction[Simplex[Int], Double]

The diameter of a simplex (its filtration value), cached if memoizeFiltrationValue.

The diameter of a simplex (its filtration value), cached if memoizeFiltrationValue.

Attributes

Source
RipserCohomology.scala

Attributes

Source
RipserCohomology.scala

Givens

Givens

The cohomology order: ascending by diameter, ties broken so a larger combinatorial index is older (the refinement Definition 3.2 relies on). A chain's leading cell is its minimum under this order, so the pivot of a reduced coboundary is its oldest cofacet.

The cohomology order: ascending by diameter, ties broken so a larger combinatorial index is older (the refinement Definition 3.2 relies on). A chain's leading cell is its minimum under this order, so the pivot of a reduced coboundary is its oldest cofacet.

Attributes

Source
RipserCohomology.scala