EdgeCollapse

org.appliedtopology.tda4j.EdgeCollapse
object EdgeCollapse

Edge collapse of a Vietoris-Rips filtration (Boissonnat and Pritam, "Edge Collapse and Persistence of Flag Complexes", SoCG 2020; Glisse and Pritam, "Swap, Shift and Trim to Edge Collapse a Filtration", SoCG 2022): a smaller weighted graph whose flag complex has the same persistent homology at every scale, computed from the graph alone.

An edge {u, v} is dominated by a vertex w when every common neighbour of u and v is a neighbour of w; removing a dominated edge (and the simplices containing it) from a flag complex is a collapse. Over a filtration, an edge's entry is postponed to the last scale at which it is still dominated, or the edge is removed if it stays dominated to the end. This is a port of GUDHI's single pass (Flag_complex_edge_collapser.h): edges in decreasing order of their original value, each decided once against the graph as it stands. The order matters: deciding the edges independently and iterating to a fixed point removes too much. One pass is not necessarily minimal, and collapsing the output again may shrink it further.

At every scale the collapsed complex is a subcomplex of the original, so a representative computed on it is a representative of the same class in the original complex.

Attributes

Experimental
true
Source
EdgeCollapseStream.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

case class Stats(edgesBefore: Int, edgesAfter: Int)

edgesBefore/edgesAfter count DISTINCT unordered pairs (not the 2x directed entries this class's own internal adjacency structure keeps).

edgesBefore/edgesAfter count DISTINCT unordered pairs (not the 2x directed entries this class's own internal adjacency structure keeps).

Attributes

Source
EdgeCollapseStream.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def collapse(metricSpace: FiniteMetricSpace[Int], maxFiltrationValue: Option[Double] = ...): EdgeCollapsedMetricSpace

The collapsed Vietoris-Rips graph of metricSpace, considering the edges up to maxFiltrationValue (default: the minimum enclosing radius). Assumes the elements are 0 until size (wrap in IntMetricSpace otherwise).

The collapsed Vietoris-Rips graph of metricSpace, considering the edges up to maxFiltrationValue (default: the minimum enclosing radius). Assumes the elements are 0 until size (wrap in IntMetricSpace otherwise).

Attributes

Source
EdgeCollapseStream.scala