NmForceDirectedLayout class

Force-directed layout algorithm (Fruchterman-Reingold).

Constructors

NmForceDirectedLayout({required List<NmGraphNodeData> nodes, required List<NmGraphEdgeData> edges, double width = 800.0, double height = 600.0, int iterations = 100, double coolingFactor = 0.95})
Creates a NmForceDirectedLayout.

Properties

coolingFactor → double
Cooling factor.
final
edges → List<NmGraphEdgeData>
Edges.
final
hashCode → int
The hash code for this object.
no setterinherited
height → double
Height.
final
isComplete → bool
Check if simulation is complete.
no setter
iterations → int
Iterations.
final
nodes → List<NmGraphNodeData>
Nodes.
final
progress → double
Get progress (0.0 to 1.0).
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
width → double
Width.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset() → void
Reset the simulation.
runSimulation() → void
Run the full simulation.
step() → void
Run one step of the simulation.
toString() → String
A string representation of this object.
inherited

Operators

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