@graphty/algorithms / index / TeraHacResult
Interface: TeraHacResult ​
Defined in: indexed/terahac.ts:34
Result of the index-based TeraHAC: the flat clustering plus the dendrogram. Dendrogram node i < n is node index i; node n + k is the k-th join, with children left[k] and right[k].
Extends ​
Properties ​
count ​
readonlycount:number
Defined in: indexed/components.ts:11
Number of distinct labels.
Inherited from ​
distance ​
readonlydistance:F64
Defined in: indexed/terahac.ts:40
Linkage distance of each join; Infinity for the joins that tie the remaining clusters under one root.
labels ​
readonlylabels:U32
Defined in: indexed/components.ts:9
Dense label per node index, in first-seen order.
Inherited from ​
left ​
readonlyleft:U32
Defined in: indexed/terahac.ts:36
Left child of each join (the legacy ClusterNode.left).
merges ​
readonlymerges:number
Defined in: indexed/terahac.ts:44
Joins made by distance: distance.subarray(0, merges) is the legacy distances list.
right ​
readonlyright:U32
Defined in: indexed/terahac.ts:38
Right child of each join.
root ​
readonlyroot:number
Defined in: indexed/terahac.ts:46
The dendrogram root: 2n - 2, or 0 for a single node.
size ​
readonlysize:U32
Defined in: indexed/terahac.ts:42
Node count under each join.
Methods ​
groups() ​
groups():
U32[]
Defined in: indexed/components.ts:16
Node indices grouped by label, computed once and cached.
Returns ​
U32[]
One array per label