java.lang.Object
org.jgrapht.alg.drawing.BaseLayoutAlgorithm2D<V,E>
- Type Parameters:
V
- the vertex typeE
- the edge type
- All Implemented Interfaces:
LayoutAlgorithm2D<V,
E>
- Direct Known Subclasses:
CircularLayoutAlgorithm2D
,FRLayoutAlgorithm2D
,RandomLayoutAlgorithm2D
,RescaleLayoutAlgorithm2D
A base class for a 2d layout algorithm.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new layout algorithmBaseLayoutAlgorithm2D
(Function<V, Point2D> initializer) Create a new layout algorithm with an initializer. -
Method Summary
Modifier and TypeMethodDescriptionGet the initializerprotected void
Initialize a model using the initializer.void
setInitializer
(Function<V, Point2D> initializer) Set the initializerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jgrapht.alg.drawing.LayoutAlgorithm2D
layout
-
Field Details
-
initializer
A model initializer
-
-
Constructor Details
-
BaseLayoutAlgorithm2D
public BaseLayoutAlgorithm2D()Create a new layout algorithm -
BaseLayoutAlgorithm2D
Create a new layout algorithm with an initializer.- Parameters:
initializer
- the initializer
-
-
Method Details
-
getInitializer
Get the initializer- Returns:
- the initializer
-
setInitializer
Set the initializer- Parameters:
initializer
- the initializer
-
init
Initialize a model using the initializer.- Parameters:
graph
- the graphmodel
- the model
-