Skip to content

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.

ParameterType
aDiagram
bDiagram

number

import { ripsH1, bottleneckDistance } from "@saehrimnir/sickle";
// Compares two H1 diagrams — arrays of [birth, death] pairs.
const circle = ripsH1(circlePoints); // [[0.1256, 1.7526]] — one loop
const arc = ripsH1(arcPoints); // [] — none
bottleneckDistance(circle, arc); // 0.8135