bottleneckDistance
function bottleneckDistance(a, b): number;Defined in: metrics/topology.ts:312
Bottleneck distance between two general persistence diagrams of [birth, death]
pairs. Use bottleneckH0 for degree-0 diagrams, which is far faster.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
a | Diagram |
b | Diagram |
Returns
Section titled “Returns”number
Example
Section titled “Example”import { ripsH1, bottleneckDistance } from "@saehrimnir/sickle";
// Compares two H1 diagrams — arrays of [birth, death] pairs.const circle = ripsH1(circlePoints); // [[0.1256, 1.7526]] — one loopconst arc = ripsH1(arcPoints); // [] — none
bottleneckDistance(circle, arc); // 0.8135