Class AbstractIterativeLayoutAlgorithm<V>

    • Field Detail

      • layoutModel

        protected LayoutModel<V> layoutModel
        because the IterativeLayoutAlgorithms use multithreading to continuously update vertex positions, the layoutModel state is saved (during the visit method) so that it can be used continuously
      • shouldPreRelax

        protected boolean shouldPreRelax
      • preRelaxDurationMs

        protected int preRelaxDurationMs
      • random

        protected Random random
      • afterRunnable

        protected Runnable afterRunnable
      • threaded

        protected boolean threaded
      • cancelled

        protected boolean cancelled
    • Method Detail

      • setRandomSeed

        public void setRandomSeed​(long randomSeed)
      • preRelax

        public final boolean preRelax()
        Description copied from interface: IterativeLayoutAlgorithm
        may be a no-op depending on how the algorithm instance is created
        Specified by:
        preRelax in interface IterativeLayoutAlgorithm<V>
        Returns:
        true if a prerelax was done, false otherwise
      • visit

        public void visit​(LayoutModel<V> layoutModel)
        because the IterativeLayoutAlgorithms use multithreading to continuously update vertex positions, the layoutModel state is saved (during the visit method) so that it can be used continuously
        Specified by:
        visit in interface LayoutAlgorithm<V>
        Parameters:
        layoutModel - the mediator between the container for vertices (the Graph) and the mapping from Vertex to Point
      • isThreaded

        public boolean isThreaded()
        Specified by:
        isThreaded in interface Threaded
      • setThreaded

        public void setThreaded​(boolean threaded)
        Specified by:
        setThreaded in interface Threaded