CellularHomologyContext

org.appliedtopology.tda4j.homology.CellularHomologyContext
class CellularHomologyContext[CellT, CoefficientT, FiltrationT]

Naive persistent homology via the standard single-pivot-table reduction algorithm: process cells in filtration order, reduce each cell's boundary against the pivots recorded so far, and every cell either opens a class (reduced boundary is zero) or closes one (reduced boundary is nonzero, and its leading cell -- the pivot -- is necessarily a previously-opened, still-unpaired cell).

No clearing, no chunking, no cohomology/twist optimization: this is the reference-grade baseline the other algorithm in this file (PersistenceInChunksContext) can be cross-validated against.

Correctness note for future maintainers: the RingModule/Ordering[CellT] instances used for chain arithmetic MUST be summoned inside HomologyState, not at CellularHomologyContext class scope. A given Ordering[CellT] derived from a per-stream filtrationOrdering only exists once a stream is available (i.e. inside HomologyState); summoning Chain[CellT, CoefficientT] is RingModule any earlier silently falls back to the generic, filtration-blind OrderedCell-derived ordering and bakes it into that RingModule instance's closures permanently (Scala resolves a given's own implicit parameters once, at the point the given is constructed, not at each later call to its methods). A real, confirmed bug -- see .claude/WORKLOG-naive-homology.md.

Attributes

Experimental
true
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class CubicalHomologyContext[CoefficientT, FiltrationT]
class SimplicialHomologyContext[VertexT, CoefficientT, FiltrationT]
class TDAContext[VertexT, CoefficientT, FiltrationT]

Members list

Type members

Classlikes

class HomologyState(boundaries: Map[CellularHomologyContext.this.CellT, Chain[CellularHomologyContext.this.CellT, CellularHomologyContext.this.CoefficientT]], generators: Map[CellularHomologyContext.this.CellT, Chain[CellularHomologyContext.this.CellT, CellularHomologyContext.this.CoefficientT]], val positives: Map[CellularHomologyContext.this.CellT, (CellularHomologyContext.this.FiltrationT, Chain[CellularHomologyContext.this.CellT, CellularHomologyContext.this.CoefficientT])], stream: CellStream[CellularHomologyContext.this.CellT, CellularHomologyContext.this.FiltrationT], var current: CellularHomologyContext.this.FiltrationT, barcode: ArrayDeque[(Int, CellularHomologyContext.this.FiltrationT, CellularHomologyContext.this.FiltrationT, Chain[CellularHomologyContext.this.CellT, CellularHomologyContext.this.CoefficientT])])

Attributes

Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

def persistentHomology(stream: => CellStream[CellT, FiltrationT]): HomologyState