Skip to content

@graphty/layout / index / SpringElectricalOptions

Interface: SpringElectricalOptions ​

Defined in: simulation/types.ts:57

Design 9.3 SpringElectricalOptions (ngraph's names and defaults, design 7.20); no CPU simulation in v1.

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


dragCoefficient? ​

readonly optional dragCoefficient?: number

Defined in: simulation/types.ts:63


gravity? ​

readonly optional gravity?: number | null

Defined in: simulation/types.ts:62

ngraph's Coulomb constant (negative repels); null or absent: ngraph's -12 scaled down the same way.


iterationsPerStep? ​

readonly optional iterationsPerStep?: number

Defined in: simulation/types.ts:17

Iterations per step() call; default 1; the element passes its stepMultiplier (design 9.4 item 4).

Inherited from ​

SimulationOptions.iterationsPerStep


maxInFlight? ​

readonly optional maxInFlight?: number

Defined in: simulation/types.ts:19

GPU simulations only (design 7.19); default 2.

Inherited from ​

SimulationOptions.maxInFlight


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


settleThreshold? ​

readonly optional settleThreshold?: number

Defined in: simulation/types.ts:14

Settle when the mean per-node displacement stays below settleThreshold * rmsRadius for settleWindow iterations (design 7.17).

Inherited from ​

SimulationOptions.settleThreshold


settleWindow? ​

readonly optional settleWindow?: number

Defined in: simulation/types.ts:15

Inherited from ​

SimulationOptions.settleWindow


springCoefficient? ​

readonly optional springCoefficient?: number | null

Defined in: simulation/types.ts:60

Hooke's constant; null or absent: ngraph's 0.8 scaled down on graphs over a few hundred nodes (the GPU simulation's size rule).


springLength? ​

readonly optional springLength?: number

Defined in: simulation/types.ts:58


timeStep? ​

readonly optional timeStep?: number

Defined in: simulation/types.ts:64