Skip to content

gabrielEdges

function gabrielEdges(ldIn, strategy?): [number, number][];

Defined in: metrics/geometric.ts:131

The Gabriel graph of the projection: which points a viewer reads as adjacent.

"auto" (the default) picks an O(N log N) algorithm, falling back to the O(N²) definition when coincident points make the triangulation degenerate.

ParameterTypeDefault value
ldInPointsInputundefined
strategyGabrielStrategy"auto"

[number, number][]

import { gabrielEdges } from "@saehrimnir/sickle";
// 2-D only — throws otherwise.
const edges = gabrielEdges(projection);
edges.length; // 351 for these 200 points
edges[0]; // [101, 145] — a pair of point indices