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
Nested Classes -
Field Summary
Fields inherited from class repast.simphony.visualization.visualization3D.layout.JungNetworkLayout
changeListeners, changeSupport, dontmove, objectData, vertex_locations, visibleEdges, visibleGraph, visibleVertices, xSize, ySizeFields inherited from class repast.simphony.visualization.AbstractNetworkLayout
baseGraph, layoutName, locationData -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidMoves the iteration forward one notch, calculation attraction and repulsion between vertices and edges and cooling the temperature.voidvoidvoidcalcRepulsion(Object v1) voidGets 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.intgetX()intgetY()intgetZ()booleanReturns true once the current iteration has passed the maximum count, MAX_ITERATIONS.voidinitialize(DimensionLocal size) voidinitialize(DimensionLocal size, JungVertexLocationFunction v_locations) protected voidInitializes all local information, and is called immediately within the initialize() process.protected voidInitializes the local information on a single vertex.protected voidinitializeLocation(Object o, double[] coord, DimensionLocal d) Sets random locations for a vertex within the dimensions of the space.protected voidbooleanThis one is an incremental visualization.voidsetAttractionMultiplier(double attraction) voidsetMaxIterations(int maxIterations) voidsetProjection(Network projection) Sets the projection associated with this Layout.voidsetRepulsionMultiplier(double repulsion) voidsetX(int x) voidsetY(int y) voidsetZ(int z) voidupdate()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, unlockVertexMethods 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:
initializeLocationsin 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:JungNetworkLayoutset update by default to advance positions -
getStatus
Returns the current temperature and number of iterations elapsed, as a string.- Overrides:
getStatusin classJungNetworkLayout<T>
-
forceMove
- Overrides:
forceMovein classJungNetworkLayout<T>
-
initialize_local
protected void initialize_local()Description copied from class:JungNetworkLayoutInitializes 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_localin 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:JungNetworkLayoutInitializes 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_vertexin 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:
advancePositionsin 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:JungNetworkLayoutFinds the location of the object- Specified by:
getLocationin interfaceLayout<T,Network<T>> - Overrides:
getLocationin classJungNetworkLayout<T>- Parameters:
obj- you want to find location of- Returns:
- the float[] containing the location
-
setProjection
Description copied from interface:LayoutSets the projection associated with this Layout.- Specified by:
setProjectionin interfaceLayout<T,Network<T>> - Overrides:
setProjectionin classJungNetworkLayout<T>- Parameters:
projection- the associated projection.
-
getCurrentSize
Description copied from class:JungNetworkLayoutReturns the current size of the visualization space, same as JUNG AbstractLayout.getCurrentSize()- Overrides:
getCurrentSizein 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:LayoutGets 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.
-