Skip to content

bottleneckH0

function bottleneckH0(a, b): number;

Defined in: metrics/topology.ts:132

Bottleneck distance between two degree-0 diagrams — the single worst mismatch.

Takes multisets of death times, as persistenceH0 returns.

ParameterType
aArrayLike<number>
bArrayLike<number>

number

import { persistenceH0, bottleneckH0 } from "@saehrimnir/sickle";
// Takes two arrays of *deaths*, not point sets.
const a = persistenceH0(data), b = persistenceH0(projection);
bottleneckH0(a.deaths, b.deaths); // 1.5859, in the data's units
// Normalise by each diagram's diameter to compare across scales — which is
// exactly what `topologicalH0` does for you.