Module imp2d

Class EadesLayout

All Implemented Interfaces:
Manageable, Shareable

public class EadesLayout extends ForceBasedLayout
A EadesLayout computes a graph layout based on the force based eades model.
  • Field Details

    • $TYPE

      public static final EadesLayout.Type $TYPE
    • minDistanceX$FIELD

      public static final SCOType.Field minDistanceX$FIELD
    • minDistanceY$FIELD

      public static final SCOType.Field minDistanceY$FIELD
    • repellingConst$FIELD

      public static final SCOType.Field repellingConst$FIELD
    • springConst$FIELD

      public static final SCOType.Field springConst$FIELD
  • Constructor Details

    • EadesLayout

      public EadesLayout()
  • Method Details

    • setRandomPosition

      protected void setRandomPosition(Node nodeTemp, Random rnd)
      Calculating the inital positions of the nodes
      Specified by:
      setRandomPosition in class ForceBasedLayout
    • computeForce

      protected void computeForce(Node s, Node t, Vector2f force)
      Comnputes the repelling force of two nodes s and t
      Specified by:
      computeForce in class ForceBasedLayout
      Parameters:
      s - the source node
      t - the target node
      force - the force in the direction from s to t has to be placed in here
    • computeForce

      protected void computeForce(Edge e, Vector2f force)
      Computes the attraction force of two nodes connected by an edge e
      Specified by:
      computeForce in class ForceBasedLayout
      Parameters:
      e - an edge
      force - the force in the direction from edge.source to edge.target has to be placed in here
    • getManageableType

      public ManageableType getManageableType()