Module imp2d

Class ForceBasedLayout2

All Implemented Interfaces:
Manageable, Shareable

public abstract class ForceBasedLayout2 extends Layout
A second ForceBasedLayout computes a graph layout based on a force model. The concrete force model has to be implemented in subclasses. (e. g. FruchtermanReingold, Eades, DavidsonHarel)
Author:
Birka Fonkeng
  • Field Details

    • fMaxIterations

      public int fMaxIterations
    • fMaxIterationsTemp

      public int fMaxIterationsTemp
    • fDistanceMultiplierMin

      protected float fDistanceMultiplierMin
    • fDistanceMultiplierMax

      protected float fDistanceMultiplierMax
    • fDistanceMultiplier

      protected float fDistanceMultiplier
  • Constructor Details

    • ForceBasedLayout2

      public ForceBasedLayout2()
  • Method Details

    • createAlgorithm

      protected Layout.Algorithm createAlgorithm()
      Description copied from class: Layout
      Creates an algorithm for this layout.
      Specified by:
      createAlgorithm in class Layout
      Returns:
      a new Algorithm instance
    • repellingForce

      protected abstract Point2d repellingForce(Node firstNode, Node secondNode)
      Calculating the repelling force of two nodes
    • springForce

      protected abstract Point2d springForce(Node firstNode, Node secondNode)
      Calculating the spring force of two nodes
    • getFDeltaFactor

      protected abstract double getFDeltaFactor()
      getting the fDeltaFactor
    • setRandomPosition

      protected abstract void setRandomPosition(Node nodeTemp, Random rnd)
      Calculating the inital positions of the nodes