Skip to content

@graphty/layout / index / KamadaKawaiOptions

Interface: KamadaKawaiOptions ​

Defined in: indexed/kamada-kawai.ts:19

Options of indexed.kamadaKawai.

Extends ​

Properties ​

center? ​

readonly optional center?: ArrayLike<number>

Defined in: simulation/types.ts:7

Inherited from ​

CommonLayoutOptions.center


dim? ​

readonly optional dim?: 2 | 3

Defined in: simulation/types.ts:5

Inherited from ​

CommonLayoutOptions.dim


dist? ​

readonly optional dist?: Float32Array<ArrayBufferLike> | Float64Array<ArrayBufferLike> | null

Defined in: indexed/kamada-kawai.ts:25

The ideal distance of every pair, n * n values row by row (for example allPairsShortestPath(s).dist from @graphty/algorithms). The diagonal is read as 0 and a non-finite entry as unreachable (1e6). Absent: the shortest paths of the graph, with its weights read as distances.


pos? ​

readonly optional pos?: F32 | null

Defined in: indexed/kamada-kawai.ts:27

Start positions, dim values per node in index order (NaN reads as 0); absent: a circle in 2D, a seeded random cube in 3D.


scale? ​

readonly optional scale?: number

Defined in: simulation/types.ts:6

Inherited from ​

CommonLayoutOptions.scale


seed? ​

readonly optional seed?: number | null

Defined in: simulation/types.ts:8

Inherited from ​

CommonLayoutOptions.seed


weight? ​

readonly optional weight?: string | boolean | null

Defined in: indexed/kamada-kawai.ts:29

true (the default): the snapshot's weights; a string: that numeric edge column; false / null: every edge is 1.