EdgeCollapsedMetricSpace
The collapsed graph, reified as a FiniteMetricSpace[Int] over the SAME vertex ids as originalMetricSpace -- exactly the pattern WitnessMetricSpace already established for a non-metric, collapse-derived weighted graph, so it slots directly into EnumeratingCofaceSimplexStream/RipserCofaceSimplexStream unchanged. +Infinity for a collapsed-away (or never-present) pair, matching SparseMetricSpace's own "+Infinity past the cutoff, not excluded" convention.
'''Not a real metric''': collapsed edges can violate the triangle inequality freely (that is the entire point -- a shortcut through a dominating vertex is exactly what gets removed). Never hand this to JVPTree, SparseMetricSpace, RecursiveStackVietorisRipsSimplexStream, or the alpha package, same restriction WitnessMetricSpace's own doc states for the identical reason.
'''The enclosing-radius hazard''' (.claude/WORKLOG-mainstream-feature-gap-analysis.md item 5's own flagged risk, confirmed real): FiniteMetricSpace's default minimumEnclosingRadius is elements.map(x => elements.map(y => distance(x,y)).max).min -- computed against a graph that now has genuine +Infinity entries, that formula can itself evaluate to +Infinity the moment every vertex has at least one collapsed-away incident pair, silently disabling truncation for any downstream consumer that relies on the None default. Fixed structurally, not by caller discipline: minimumEnclosingRadius is overridden here to validUpTo (the bound EdgeCollapse.collapse actually used, itself defaulted from originalMetricSpace's own OWN enclosing radius when the caller passed no explicit bound) -- so a downstream maxFiltrationValue = None is always safe by construction, with nothing for a caller to remember.
Attributes
- Experimental
- true
- Graph
-
- Supertypes