HomologyState

org.appliedtopology.tda4j.homology.CellularPersistenceInChunksContext.HomologyState
class HomologyState(boundaries: Map[CellularPersistenceInChunksContext.this.CellT, Chain[CellularPersistenceInChunksContext.this.CellT, CellularPersistenceInChunksContext.this.CoefficientT]], stream: StratifiedCellStream[CellularPersistenceInChunksContext.this.CellT, Double], barcode: Map[Int, Queue[(Double, Double, Chain[CellularPersistenceInChunksContext.this.CellT, CellularPersistenceInChunksContext.this.CoefficientT])]], essentialRepresentatives: Map[CellularPersistenceInChunksContext.this.CellT, Chain[CellularPersistenceInChunksContext.this.CellT, CellularPersistenceInChunksContext.this.CoefficientT]])

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def advanceAll(): Unit
def barcodeAt(f: Double): List[PersistenceBar[Double, Chain[CellularPersistenceInChunksContext.this.CellT, CellularPersistenceInChunksContext.this.CoefficientT]]]

Representative-annotated barcode, per .claude/CLAUDE.md's coefficients-and-representatives design principle -- mirrors CellularHomologyContext.barcodeAt's output shape exactly (List[PersistenceBar[Double, Chain[CellT, CoefficientT]]]), and attaches a REAL representative to every reported bar (finite or essential, any dimension = 2 is populated lazily, here, viavcolOf-- cached intoessentialRepresentativeson first request so a repeatedbarcodeAt` call doesn't recompute it.

Representative-annotated barcode, per .claude/CLAUDE.md's coefficients-and-representatives design principle -- mirrors CellularHomologyContext.barcodeAt's output shape exactly (List[PersistenceBar[Double, Chain[CellT, CoefficientT]]]), and attaches a REAL representative to every reported bar (finite or essential, any dimension = 2 is populated lazily, here, viavcolOf-- cached intoessentialRepresentativeson first request so a repeatedbarcodeAt` call doesn't recompute it.

Attributes

def compress(k: CellularPersistenceInChunksContext.this.CellT): Unit
def diagramAt(f: Double): List[(Int, Double, Double)]
def globalReduce(sigma: CellularPersistenceInChunksContext.this.CellT): Unit
def markActiveEntries(): Unit
def processCell(sigma: CellularPersistenceInChunksContext.this.CellT, stop: CellularPersistenceInChunksContext.this.CellT => Boolean): Unit
def recordPair(sigma: CellularPersistenceInChunksContext.this.CellT, dsigmaReduced: Chain[CellularPersistenceInChunksContext.this.CellT, CellularPersistenceInChunksContext.this.CoefficientT]): Unit
def unionFindDim01(): Unit

Raw, Chain-free elder-rule union-find for dimensions 0 and 1, replacing the general Chain.reduceByUntil machinery for these two dimensions specifically -- see .claude/DESIGN-unionfind-in-chunks.md for the full derivation. Two facts make this a safe, self-contained substitution rather than an approximation:

Raw, Chain-free elder-rule union-find for dimensions 0 and 1, replacing the general Chain.reduceByUntil machinery for these two dimensions specifically -- see .claude/DESIGN-unionfind-in-chunks.md for the full derivation. Two facts make this a safe, self-contained substitution rather than an approximation:

  • Chain.reduceByUntil's own reduction (reduceLoop, Chain.scala) is a canonical fixpoint over a FIXED total order (Ordering[CellT] above) -- given that order, the reduced boundary matrix in any two dimensions is uniquely determined regardless of what order individual columns are reduced in. Elder-rule union-find, run strictly in the stream's own filtration order, computes exactly that same canonical answer for dimensions 0/1 by a cheaper algorithm, not a different one.
  • Nothing above dimension 1 ever needs what this method deliberately does NOT populate: boundaries at a vertex key (only edges ever appear in a HIGHER cell's own boundary -- 2-cells reference only edges, never vertices directly) or an R entry for a cycle-forming ("survivor") edge (markColumn only chases killer for cells in cleared, never for a cell that is merely paired or merely in essentialSimplices). Both were confirmed by tracing every read site in markActiveEntries/ eliminationFallback/compress/globalReduce, not assumed.

Ordering[CellT] (stream.filtrationOrdering) already encodes "smaller = younger" -- the same convention Chain's own pivot selection (leadingCell, Chain.from's reversed PriorityQueue ordering) uses to pick the youngest term as a boundary's pivot. "Elder rule" here is therefore just "union by this ordering": of two roots being merged, the smaller (younger) one always becomes the child, and is the vertex recorded as dying.

Generic over CellT (works for Simplex, Cube, FiniteSimplicialSet generators alike) -- a dimension-1 cell's boundary always has exactly two terms for every concrete OrderedCell in this codebase (two distinct vertices for Simplex/Cube; for FiniteSimplicialSet, always two terms too, since a dimension-0 element can never be degenerate -- there is no dimension below 0 to degenerate from -- though the two terms can reference the SAME vertex, e.g. a self-loop edge like SimplicialSetFixtures.minimalSphere(1)'s). Comparing ROOTS after find, not raw endpoints, handles that case uniformly: a same-vertex self-loop resolves to a single root immediately, correctly read as cycle-forming, with no special case needed.

Attributes

Givens

Givens