CechFiltration

org.appliedtopology.tda4j.streams.CechFiltration

The Cech radius of a simplex: the true minimum-enclosing-ball radius of its vertices' coordinates, computed once per simplex and cached forever -- a deliberate departure from RipserCohomologyContext's "don't cache filtration values by default" doctrine, since (unlike VR's diameter, which insertionDiameter recomputes incrementally in O(d)) there is no incremental shortcut for a minimum-enclosing-ball radius: every filter check, sort, and filtrationOrdering comparison would otherwise re-run a full Miniball solve.

Caching is also a correctness safeguard, not just a speed one: Miniball is a randomized-incremental algorithm, so two separate calls on the identical input can in principle round differently and return bit-different radii. filtrationOrdering needs one consistent answer per simplex to stay a total order; caching guarantees that without needing to trust a third-party library's determinism.

Cech's own value over Vietoris-Rips is exactly this quantity: unlike VR's purely combinatorial max-pairwise- distance, the Cech radius needs the vertices' real coordinates and a minimum-enclosing-ball computation (Welzl's algorithm, via Miniball) -- not alpha.AlphaComplexDQP's dual active-set QP, which answers a different question (restricted-Delaunay membership, dependent on the whole point cloud, not just a simplex's own vertices).

Attributes

Experimental
true
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def apply(euclideanMetricSpace: EuclideanMetricSpace): PartialFunction[Simplex[Int], Double]

A fresh PartialFunction with its own private cache -- one call to CechFiltration(...) per stream instance, not a shared/global cache, matching every other per-stream filtration value in this codebase.

A fresh PartialFunction with its own private cache -- one call to CechFiltration(...) per stream instance, not a shared/global cache, matching every other per-stream filtration value in this codebase.

'''Monotonicity is explicitly enforced here, not merely trusted from the math''': the Cech radius is mathematically non-decreasing under vertex insertion, but Miniball's raw floating-point output can violate this by a few ULPs on near-degenerate inputs -- and CellularHomologyContext's reduction requires it to hold exactly (see CLAUDE.md's ordering-contract rule 3). Fixed by clamping every computed radius to at least the max of its own facets' ALREADY-CACHED radii (a plain lookup, never a fresh Miniball call): every facet of any simplex this method is asked about is guaranteed already cached, because filtrationValue is only ever queried on simplices the coface loop is about to accept or has already generated, and (per CechCofaceSimplexStream's own downward-closure argument) an accepted simplex's facets are always visited, and hence cached, one dimension earlier.

Attributes