java.lang.Object
org.jgrapht.alg.drawing.RandomLayoutAlgorithm2D<V,E>
- Type Parameters:
V- the vertex typeE- the edge type
- All Implemented Interfaces:
LayoutAlgorithm2D<V,E>
Random layout. The algorithm assigns vertex coordinates uniformly at random.
- Author:
- Dimitrios Michail
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new layout algorithmRandomLayoutAlgorithm2D(long seed) Create a new layout algorithmCreate a new layout algorithm -
Method Summary
Modifier and TypeMethodDescriptionGet the initializerprotected voidInitialize a model using the initializer.voidLayout a graph.voidsetInitializer(Function<V, Point2D> initializer) Set the initializer
-
Field Details
-
initializer
A model initializer
-
-
Constructor Details
-
RandomLayoutAlgorithm2D
public RandomLayoutAlgorithm2D()Create a new layout algorithm -
RandomLayoutAlgorithm2D
public RandomLayoutAlgorithm2D(long seed) Create a new layout algorithm- Parameters:
seed- seed for the random number generator
-
RandomLayoutAlgorithm2D
Create a new layout algorithm- Parameters:
rng- the random number generator
-
-
Method Details
-
layout
Description copied from interface:LayoutAlgorithm2DLayout a graph.- Parameters:
graph- the graphmodel- the layout model to use
-
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
-