Skip to content

@graphty/layout / index / fruchtermanReingold

Function: fruchtermanReingold() ​

fruchtermanReingold(g, options?): LayoutResult

Defined in: indexed/force.ts:76

Fruchterman-Reingold run for iterations iterations (default 50; a fractional count runs its ceiling, and 0, a negative or a non-finite count runs none) with the linear cooling schedule. Each NaN component of pos is drawn from the seed in [0, 1), whatever the other rows hold. Without pinned nodes the result is rescaled to scale about center; with a fixed option or a role-fixed bool column it is left in the units of pos, so a pinned node keeps exactly the coordinates it was given.

Parameters ​

g ​

GraphSnapshot

the graph; a directed snapshot is laid out as its undirected copy

options? ​

IndexedFruchtermanReingoldOptions = {}

the options

Returns ​

LayoutResult

dim values per node