PackedRipserCohomologyContext

org.appliedtopology.tda4j.homology.PackedRipserCohomologyContext
class PackedRipserCohomologyContext[CoefficientT](metricSpace: FiniteMetricSpace[Int], maxDimension: Int, useApparentPairs: Boolean = ..., maxFiltrationValue: Option[Double] = ...)(using evidence$1: Field { type Self = CoefficientT; })

Attributes

Experimental
true
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Type members

Classlikes

final case class DiameterIndex(diameter: Double, index: Long)

A simplex carried purely as (diameter, combinatorial index) -- see the class doc above for why equality deliberately ignores diameter. Not private: it's the actual Chain cell type persistentCohomology() returns bars over, so callers need to be able to name the type (e.g. to decode a bar's cells back to Simplex[Int] via SimplexIndexing.apply(index, size) for display or cross-validation).

A simplex carried purely as (diameter, combinatorial index) -- see the class doc above for why equality deliberately ignores diameter. Not private: it's the actual Chain cell type persistentCohomology() returns bars over, so callers need to be able to name the type (e.g. to decode a bar's cells back to Simplex[Int] via SimplexIndexing.apply(index, size) for display or cross-validation).

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def coboundaryOf(sigma: DiameterIndex, size: Int): Chain[DiameterIndex, CoefficientT]

Packed analogue of RipserCohomologyContext.coboundaryOf: decodes sigma exactly ONCE (never decodes any tau -- each cofacet's diameter comes from insertionDiameter, its identity from the index CofacetCursor already produces). Guard mirrors the fixed maxDimension semantics: empty only past maxDimension + 1 (size - 1 > maxDimension, i.e. sigma's own dimension exceeds what's requested), not AT it -- see .claude/WORKLOG-maxdim-semantics-fix.md.

Packed analogue of RipserCohomologyContext.coboundaryOf: decodes sigma exactly ONCE (never decodes any tau -- each cofacet's diameter comes from insertionDiameter, its identity from the index CofacetCursor already produces). Guard mirrors the fixed maxDimension semantics: empty only past maxDimension + 1 (size - 1 > maxDimension, i.e. sigma's own dimension exceeds what's requested), not AT it -- see .claude/WORKLOG-maxdim-semantics-fix.md.

Built directly on CofacetCursor, not cofacetIteratorWithVertex: the latter allocates a fresh (Int, Long) tuple on every candidate vertex considered, once the largest identified allocation cost in this class.

Attributes

def persistentCohomology(): List[PersistenceBar[Double, Chain[DiameterIndex, CoefficientT]]]

Concrete fields

Not private, as of TDA4j.scala routing engine="ripser" through this class instead of RipserCohomologyContext: a caller decoding a bar's DiameterIndex cells back to vertex arrays (e.g. PersistenceResult.cycleVertices) needs this same SimplexIndexing instance -- constructing a fresh one from metricSpace.size would work too (the class is a pure function of vertex count), but would rebuild binomialEntry's lazily-grown cache from scratch rather than reusing the one this context already populated during its own reduction.

Not private, as of TDA4j.scala routing engine="ripser" through this class instead of RipserCohomologyContext: a caller decoding a bar's DiameterIndex cells back to vertex arrays (e.g. PersistenceResult.cycleVertices) needs this same SimplexIndexing instance -- constructing a fresh one from metricSpace.size would work too (the class is a pure function of vertex count), but would rebuild binomialEntry's lazily-grown cache from scratch rather than reusing the one this context already populated during its own reduction.

Attributes

Givens

Givens

given packedOrdering: Ordering[DiameterIndex]