Skip to content

@graphty/algorithms / index / SpectralResult

Interface: SpectralResult ​

Defined in: indexed/spectral.ts:34

Result of the index-based spectral clustering.

Extends ​

Properties ​

converged ​

readonly converged: boolean

Defined in: indexed/spectral.ts:45

Whether the eigenpairs met the residual tolerance. False when the iteration stopped at its round cap -- on a graph whose small eigenvalues crowd together, such as a long path -- and the eigenpairs are then approximations (the labels usually still hold). True when there were no eigenpairs to compute.


count ​

readonly count: number

Defined in: indexed/components.ts:11

Number of distinct labels.

Inherited from ​

LabelResult.count


eigenvalues ​

readonly eigenvalues: Float64Array

Defined in: indexed/spectral.ts:36

The k smallest eigenvalues of the Laplacian, ascending; empty when k >= nodeCount.


eigenvectors ​

readonly eigenvectors: Float64Array<ArrayBufferLike>[]

Defined in: indexed/spectral.ts:38

One nodeCount-long eigenvector per eigenvalue; for randomWalk, of I - D^-1 A.


labels ​

readonly labels: U32

Defined in: indexed/components.ts:9

Dense label per node index, in first-seen order.

Inherited from ​

LabelResult.labels

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

Inherited from ​

LabelResult.groups