FruchtermanReingold class

An implementation of the Fruchterman-Reingold layout algorithm.

Inheritance

Constructors

FruchtermanReingold({required Graph graph, double C = 0.5, double tDecay = 0.99, double tInitial = 300.0, int maxIterations = 10000})

Properties

C double
final
graph Graph
The topology of the given graph.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
k double
getter/setter pair
layoutCentre ↔ Vector2
The centre of the area where the graph layout is drawn.
getter/setter pairinherited
layoutDimensions ↔ Vector2
The components of this vector correspond to the dimensions of the graph layout drawing area.
getter/setter pairinherited
maxIterations int
final
nodeLayout NodeLayout
The computed layout of the given graph.
finalinherited
nodeRadius double
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stableThreshold double
The threshold for a small change in node position in one axis.
getter/setter pairinherited
t double
The current temperature.
getter/setter pair
tDecay double
The scale factor by which t decreases every iteration.
final
tInitial double
final

Methods

clampNodeVector(Vector2 nodePosition) → void
Ensure no part of each drawn node is drawn outside the layout area.
inherited
computeLayout() → void
override
iterate() bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
updateLayoutParameters({required double width, required double height, required double nodeRadius}) → void
Specify the graph layout area and the radius of each node.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited