Class FR3DLayout<T>

  • All Implemented Interfaces:
    edu.uci.ics.jung.visualization.util.ChangeEventSupport, Layout<T,​Network<T>>

    public class FR3DLayout<T>
    extends JungNetworkLayout<T>
    Modified from the Fruchterman-Reingold algorithm for node layouts from JUNG- FRLayout for 2D...but modified to do 3D
    Author:
    M. Altaweel
    • Constructor Detail

      • FR3DLayout

        public FR3DLayout()
    • Method Detail

      • setAttractionMultiplier

        public void setAttractionMultiplier​(double attraction)
      • initializeLocation

        protected void initializeLocation​(Object o,
                                          double[] coord,
                                          DimensionLocal d)
        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)
      • getStatus

        public String getStatus()
        Returns the current temperature and number of iterations elapsed, as a string.
        Overrides:
        getStatus in class JungNetworkLayout<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 class JungNetworkLayout<T>
      • getKey

        public Object getKey()
        Returns a visualization-specific key (that is, specific both to this instance and AbstractLayout that can be used to access
      • initialize_local_vertex

        protected void initialize_local_vertex​(Object o)
        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 class JungNetworkLayout<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 class JungNetworkLayout<T>
      • calcPositions

        public void calcPositions​(Object v)
      • calcAttraction

        public void calcAttraction​(RepastEdge e)
      • calcRepulsion

        public void calcRepulsion​(Object v1)
      • setMaxIterations

        public void setMaxIterations​(int maxIterations)
      • 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.
      • 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

        public Box 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.