PersistenceEngine

org.appliedtopology.tda4j.homology.PersistenceEngine
See thePersistenceEngine companion object
trait PersistenceEngine[CellT, C]

A common shape for the three engines that consume an already-built StratifiedCellStream and are generic over CellT: OrderedCell -- CellularHomologyContext (naive), CellularPersistenceInChunksContext (chunks), and CellularCohomologyContext (cohomology). Each has its own incremental API beyond this (advanceTo/diagramAt for naive and chunks), which stays available on the concrete class -- this trait exists only to give callers that just want "the finished barcode" (the MATLAB/CLI facade) one shape to dispatch on, instead of hand-writing each engine's own construct/advance/read dance at every call site.

PackedRipserCohomologyContext/RipserCohomologyContext deliberately do NOT implement this: they consume a FiniteMetricSpace[Int] directly (building their own internal sparse-Rips enumeration), not a stream, and are specialized to Simplex[Int]/DiameterIndex rather than generic over CellT -- an honest asymmetry, not a gap (see CLAUDE.md's persistence-engines section). Callers needing Ripser call it directly.

Deliberately does NOT own the "build one dimension higher than requested, then drop it" dance (WORKLOG-maxdim-semantics-fix.md's maxDim-means-top-reported-degree fix): that dance is about how the INPUT stream gets bounded, which is complex-type-specific (LimitedCofaceSimplexStream only wraps a CofaceSimplexStream[Int, Double], so it can truncate a Vietoris-Rips/Cech stream but not a cubical or simplicial-set one -- see CLAUDE.md's LimitedCofaceSimplexStream note), not engine-specific. Callers build the appropriately-bounded stream first (as they already did before this trait existed) and pass it in; this trait only unifies what happens AFTER that -- running the engine and reading back a finished barcode.

Attributes

Companion
object
Experimental
true
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def barcode(stream: StratifiedCellStream[CellT, Double]): List[PersistenceBar[Double, Chain[CellT, C]]]