persistenceH0
function persistenceH0(vIn): PersistenceH0;Defined in: metrics/topology.ts:54
The degree-0 persistence diagram: the scales at which connected pieces merge.
Equivalently the edge lengths of the euclidean minimum spanning tree. Returned sorted, with the endpoints each merge came from.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
vIn | PointsInput |
Returns
Section titled “Returns”Example
Section titled “Example”import { persistenceH0 } from "@saehrimnir/sickle";
// H0 persistence is the minimum spanning tree: every component is born at 0// and dies when an edge joins it, so only the deaths carry information.const d = persistenceH0(data);
d.deaths.length; // 199 — n - 1 MST edgesd.deaths[0]; // 0.8461 — deaths come sorted ascendingd.source[0]; // the two endpoints of the edge that closed this componentd.diameter; // 30.0472 — the largest pairwise distance