WitnessCofaceSimplexStream

org.appliedtopology.tda4j.streams.WitnessCofaceSimplexStream
See theWitnessCofaceSimplexStream companion class

Attributes

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

Members list

Value members

Concrete methods

def apply(ambientMetricSpace: FiniteMetricSpace[Int], landmarks: IndexedSeq[Int], maxFiltrationValue: Double = ..., keepCriterion: PartialFunction[Simplex[Int], Boolean] = ...): WitnessCofaceSimplexStream

Overloads taking an already-built WitnessGeometry directly (e.g. one a caller is also handing to recursiveFiltrationValue separately, for cross-validation) -- avoids rebuilding it a second time. Scala forbids default arguments on more than one overloaded apply variant, so these mirror the primary constructor's own defaults (Double.PositiveInfinity / accept-everything) by hand instead of sharing them.

Overloads taking an already-built WitnessGeometry directly (e.g. one a caller is also handing to recursiveFiltrationValue separately, for cross-validation) -- avoids rebuilding it a second time. Scala forbids default arguments on more than one overloaded apply variant, so these mirror the primary constructor's own defaults (Double.PositiveInfinity / accept-everything) by hand instead of sharing them.

Attributes

def apply(geometry: WitnessGeometry, maxFiltrationValue: Double): WitnessCofaceSimplexStream
def apply(geometry: WitnessGeometry, maxFiltrationValue: Double, keepCriterion: PartialFunction[Simplex[Int], Boolean]): WitnessCofaceSimplexStream
def recursiveFiltrationValue(geometry: WitnessGeometry): PartialFunction[Simplex[Int], Double]

max(own_k(sigma), max over sigma's own facets), memoized -- unlike EnumeratingCofaceSimplexStream's own filtrationValueCache (which only memoizes the DEFAULT MaximumDistanceFiltrationValue fallback), a caller-supplied filtrationValueOverride is NOT memoized by the base class itself, and Chain's reduction consults filtrationValue on every pivot comparison -- so a genuinely expensive override (this one: O(N) per call, before recursion) must cache itself, exactly like CechFiltration does.

max(own_k(sigma), max over sigma's own facets), memoized -- unlike EnumeratingCofaceSimplexStream's own filtrationValueCache (which only memoizes the DEFAULT MaximumDistanceFiltrationValue fallback), a caller-supplied filtrationValueOverride is NOT memoized by the base class itself, and Chain's reduction consults filtrationValue on every pivot comparison -- so a genuinely expensive override (this one: O(N) per call, before recursion) must cache itself, exactly like CechFiltration does.

'''Not cache.getOrElse(facet, 0.0)''' (the shortcut CechFiltration uses for its own facet floor): unlike Cech, this stream's candidate generation touches only ONE canonical facet per candidate (the one obtained by removing the minimum vertex) before this function is ever asked about the candidate at all -- a facet other than that one is generally NOT already cached, and defaulting it to 0.0 would silently drop it from the max, corrupting monotonicity for exactly the simplices this recursion exists to get right. Recursing (apply calling itself on every facet) computes it instead of assuming it, at the cost JavaPlex's own containsElement short-circuit exists to avoid -- see the class doc for why that short-circuit isn't a correctness requirement here.

Attributes