The general witness complex (De Silva & Carlsson 2004; JavaPlex's plain WitnessStream): unlike the lazy variant above, NOT a flag complex -- a higher simplex's own witness condition uses a DIMENSION-SPECIFIC threshold m_k (the (k+1)-th nearest landmark, k = the simplex's own dimension) that need not be monotone facet-to-coface on its own, so every simplex's recorded filtration value is max(own_k(sigma), max over its own facets' filtration values) (JavaPlex's own addCofaces_: filtrationIndex = max(filtrationIndex, ...) over the boundary, then maxed again with the simplex's own witness value). This recursive max is what makes "the complex at threshold R" automatically downward-closed for every R -- the same way VR's own "max pairwise distance" does -- and it also makes JavaPlex's separate containsElement(face) gate redundant here (any facet whose own value exceeds a threshold forces its coface's value above that threshold too, via the max): see .claude/WORKLOG-witness-complex.md for the proof. So, unlike the eager reference implementation, RipserCofaceSimplexStream's plain "generate from the canonical (min-vertex-removed) facet, filter by filtrationValue <= threshold" shape is already correct once fed this recursive filtration value -- no extra "are all my facets already accepted" check needed.
nu plays no role here (each dimension has its own fixed m_k, not a caller-chosen parameter) -- the WitnessMetricSpace handed to the superclass exists only to satisfy RipserCofaceSimplexStream's constructor; its distance is never actually read (see that class's own "lazy, not eager" note), since filtrationValueOverride replaces filtrationValue for every dimension including edges, and maxFiltrationValue is always supplied explicitly (default +Infinity, i.e. untruncated) rather than left None -- None would fall back to minimumEnclosingRadius, NOT a valid truncation for a non-flag complex like this one (see .claude/WORKLOG-witness-complex.md).
'''Fact used to cross-validate against the lazy stream''' (WitnessStreamSpec): this class's own 1-skeleton is IDENTICAL to LazyWitnessSimplexStream(..., nu = 2)'s -- both use the 2nd-nearest-landmark threshold for edges (m_1 here, m_nu there with its sentinel-shifted index), reached via different code paths.
Built via the companion apply (below), not new, so the shared WitnessGeometry (O(L*N) to build) is computed exactly once and reused both for the superclass's WitnessMetricSpace and for recursiveFiltrationValue -- constructing it twice from raw (ambientMetricSpace, landmarks) would silently duplicate that work.
'''Performance hazard, standing for any unbounded coface stream, not specific to this one''': iterating this stream at its default maxFiltrationValue = +Infinity enumerates EVERY dimension up to landmarks.size - 1 -- the full 2^L power set for L landmarks, since nothing about the recursive filtration value ever prunes a candidate at an unbounded threshold. matlab.TDA4j's own facade avoids this by always wrapping in LimitedCofaceSimplexStream (its maxDimension option defaults to reporting H_0..H_2, i.e. simplices up to 4 vertices); a caller driving this class directly should do the same, or pass a finite maxFiltrationValue -- see .claude/WORKLOG-witness-complex.md for tutorial-scale timing measurements (machine-specific, kept there rather than here).
Attributes
- Companion
- object
- Experimental
- true
- Graph
-
- Supertypes