Class FR3DLayout<T>
java.lang.Object
repast.simphony.visualization.AbstractNetworkLayout<T>
repast.simphony.visualization.visualization3D.layout.JungNetworkLayout<T>
repast.simphony.visualization.visualization3D.layout.FR3DLayout<T>
- All Implemented Interfaces:
edu.uci.ics.jung.visualization.util.ChangeEventSupport
,Layout<T,
Network<T>>
Modified from the Fruchterman-Reingold algorithm for node layouts from JUNG-
FRLayout for 2D...but modified to do 3D
- Author:
- M. Altaweel
-
Nested Class Summary
-
Field Summary
Fields inherited from class repast.simphony.visualization.visualization3D.layout.JungNetworkLayout
changeListeners, changeSupport, dontmove, objectData, vertex_locations, visibleEdges, visibleGraph, visibleVertices, xSize, ySize
Fields inherited from class repast.simphony.visualization.AbstractNetworkLayout
baseGraph, layoutName, locationData
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Moves the iteration forward one notch, calculation attraction and repulsion between vertices and edges and cooling the temperature.void
void
void
calcRepulsion
(Object v1) void
Gets a bounding box that describes the extent of this layout in location coordinates.Returns the current size of the visualization space, same as JUNG AbstractLayout.getCurrentSize()getKey()
Returns a visualization-specific key (that is, specific both to this instance and AbstractLayout that can be used to accessfloat[]
getLocation
(Object obj) Finds the location of the objectReturns the current temperature and number of iterations elapsed, as a string.int
getX()
int
getY()
int
getZ()
boolean
Returns true once the current iteration has passed the maximum count, MAX_ITERATIONS.void
initialize
(DimensionLocal size) void
initialize
(DimensionLocal size, JungVertexLocationFunction v_locations) protected void
Initializes all local information, and is called immediately within the initialize() process.protected void
Initializes the local information on a single vertex.protected void
initializeLocation
(Object o, double[] coord, DimensionLocal d) Sets random locations for a vertex within the dimensions of the space.protected void
boolean
This one is an incremental visualization.void
setAttractionMultiplier
(double attraction) void
setMaxIterations
(int maxIterations) void
setProjection
(Network projection) Sets the projection associated with this Layout.void
setRepulsionMultiplier
(double repulsion) void
setX
(int x) void
setY
(int y) void
setZ
(int z) void
update()
set update by default to advance positionsMethods inherited from class repast.simphony.visualization.visualization3D.layout.JungNetworkLayout
addChangeListener, addEdgesOrVertices, applyFilter, dontMove, fireStateChanged, forceMove, getAVertex, getBaseKey, getChangeListeners, getCoordinates, getEdge, getEdge, getGraph, getLocation, getName, getVertex, getVertex, getVisibleEdges, getVisibleGraph, getVisibleVertices, getX, getXSize, getY, getYSize, initialize, initialize, initializeLocation, lockVertex, offsetVertex, postInitialize, removeChangeListener, resetVisibleEdgesAndVertices, resize, restart, returnEqualSet, returnMatchingCoordinate, setXSize, setYSize, unlockVertex
Methods inherited from class repast.simphony.visualization.AbstractNetworkLayout
getLayoutProperties, getLocationData, setLayoutProperties
-
Constructor Details
-
FR3DLayout
public FR3DLayout()
-
-
Method Details
-
setAttractionMultiplier
public void setAttractionMultiplier(double attraction) -
initializeLocations
protected void initializeLocations()- Overrides:
initializeLocations
in classJungNetworkLayout<T>
-
initializeLocation
Sets random locations for a vertex within the dimensions of the space. If you want to initialize in some different way, override this method.- Parameters:
coord
-o
-d
-
-
setRepulsionMultiplier
public void setRepulsionMultiplier(double repulsion) -
update
public void update()Description copied from class:JungNetworkLayout
set update by default to advance positions -
getStatus
Returns the current temperature and number of iterations elapsed, as a string.- Overrides:
getStatus
in classJungNetworkLayout<T>
-
forceMove
- Overrides:
forceMove
in classJungNetworkLayout<T>
-
initialize_local
protected void initialize_local()Description copied from class:JungNetworkLayout
Initializes all local information, and is called immediately within the initialize() process. The user is responsible for overriding this method to do any construction that may be necessary: for example, to initialize local per-edge or graph-wide data.- Overrides:
initialize_local
in classJungNetworkLayout<T>
-
getKey
Returns a visualization-specific key (that is, specific both to this instance and AbstractLayout that can be used to access -
initialize
-
initialize
-
initialize_local_vertex
Description copied from class:JungNetworkLayout
Initializes the local information on a single vertex. The user is responsible for overriding this method to do any vertex-level construction that may be necessary: for example, to attach vertex-level information to each vertex.- Specified by:
initialize_local_vertex
in classJungNetworkLayout<T>
-
advancePositions
public void advancePositions()Moves the iteration forward one notch, calculation attraction and repulsion between vertices and edges and cooling the temperature.- Specified by:
advancePositions
in classJungNetworkLayout<T>
-
calcPositions
-
calcAttraction
-
calcRepulsion
-
setMaxIterations
public void setMaxIterations(int maxIterations) -
getFRData
-
isIncremental
public boolean isIncremental()This one is an incremental visualization. -
incrementsAreDone
public boolean incrementsAreDone()Returns true once the current iteration has passed the maximum count, MAX_ITERATIONS. -
getLocation
Description copied from class:JungNetworkLayout
Finds the location of the object- Specified by:
getLocation
in interfaceLayout<T,
Network<T>> - Overrides:
getLocation
in classJungNetworkLayout<T>
- Parameters:
obj
- you want to find location of- Returns:
- the float[] containing the location
-
setProjection
Description copied from interface:Layout
Sets the projection associated with this Layout.- Specified by:
setProjection
in interfaceLayout<T,
Network<T>> - Overrides:
setProjection
in classJungNetworkLayout<T>
- Parameters:
projection
- the associated projection.
-
getCurrentSize
Description copied from class:JungNetworkLayout
Returns the current size of the visualization space, same as JUNG AbstractLayout.getCurrentSize()- Overrides:
getCurrentSize
in classJungNetworkLayout<T>
- Returns:
- the current size of the screen
-
getX
public int getX() -
setX
public void setX(int x) -
getY
public int getY() -
setY
public void setY(int y) -
getZ
public int getZ() -
setZ
public void setZ(int z) -
getBoundingBox
Description copied from interface:Layout
Gets a bounding box that describes the extent of this layout in location coordinates.- Returns:
- a bounding box that describes the extent of this layout in location coordinates, or a 0 size box if the extent is unknown.
-