$darkmode
DENOPTIM
denoptim.gui.DNPSpringLayout< V, E > Class Template Reference

This layout extends the SpringLayout to change its behaviour. More...

Inheritance diagram for denoptim.gui.DNPSpringLayout< V, E >:
[legend]
Collaboration diagram for denoptim.gui.DNPSpringLayout< V, E >:
[legend]

Classes

class  RecreateKnownPositions
 

Public Member Functions

 DNPSpringLayout (Graph< V, E > g)
 
void setInitialLocations (Map< String, Point2D > vertexPosition, boolean lock)
 
void initialize ()
 
Point2D getVertexPosition (V vertex) throws ExecutionException
 Returns the current value of the position of the given vertex. More...
 
void step ()
 Relaxation step. More...
 

Private Member Functions

void testTermination ()
 

Private Attributes

Map< String, Point2D > oldVertexPosition
 
Dimension oldRange = new Dimension()
 
int iteration = 0
 
int maxIterations = 500
 
boolean lockInitialPositions = false
 

Detailed Description

This layout extends the SpringLayout to change its behaviour.

The differences are:

  • the initial position of some nodes can be set and locked,
  • a maximum number of relaxation iteration is set.
Author
Marco Foscato

Definition at line 45 of file DNPSpringLayout.java.

Constructor & Destructor Documentation

◆ DNPSpringLayout()

denoptim.gui.DNPSpringLayout< V, E >.DNPSpringLayout ( Graph< V, E >  g)

Definition at line 57 of file DNPSpringLayout.java.

Member Function Documentation

◆ getVertexPosition()

Point2D denoptim.gui.DNPSpringLayout< V, E >.getVertexPosition ( vertex) throws ExecutionException

Returns the current value of the position of the given vertex.

Parameters
vertexthe vertex to get the position of.
Returns
the position of the given vertex.
Exceptions
ExecutionException

Definition at line 146 of file DNPSpringLayout.java.

Referenced by denoptim.gui.JUNGGraphSnapshot.JUNGGraphSnapshot().

Here is the caller graph for this function:

◆ initialize()

◆ setInitialLocations()

void denoptim.gui.DNPSpringLayout< V, E >.setInitialLocations ( Map< String, Point2D >  vertexPosition,
boolean  lock 
)

Definition at line 66 of file DNPSpringLayout.java.

◆ step()

void denoptim.gui.DNPSpringLayout< V, E >.step ( )

Relaxation step.

Moves all nodes

Definition at line 157 of file DNPSpringLayout.java.

References denoptim.gui.DNPSpringLayout< V, E >.iteration, and denoptim.gui.DNPSpringLayout< V, E >.testTermination().

Here is the call graph for this function:

◆ testTermination()

void denoptim.gui.DNPSpringLayout< V, E >.testTermination ( )
private

Definition at line 165 of file DNPSpringLayout.java.

References denoptim.gui.DNPSpringLayout< V, E >.iteration, and denoptim.gui.DNPSpringLayout< V, E >.maxIterations.

Referenced by denoptim.gui.DNPSpringLayout< V, E >.step().

Here is the caller graph for this function:

Member Data Documentation

◆ iteration

◆ lockInitialPositions

boolean denoptim.gui.DNPSpringLayout< V, E >.lockInitialPositions = false
private

◆ maxIterations

int denoptim.gui.DNPSpringLayout< V, E >.maxIterations = 500
private

◆ oldRange

Dimension denoptim.gui.DNPSpringLayout< V, E >.oldRange = new Dimension()
private

Definition at line 48 of file DNPSpringLayout.java.

◆ oldVertexPosition

Map<String, Point2D> denoptim.gui.DNPSpringLayout< V, E >.oldVertexPosition
private

The documentation for this class was generated from the following file: