Module imp2d

Class Edge

java.lang.Object
de.grogra.imp2d.layout.Edge

public final class Edge extends Object
An Edge represents an edge of a graph which is to be layouted by a Layout. Such a graph is constructed as an image of an actual source Graph.
Author:
Ole Kniemeyer
See Also:
  • Field Details

    • object

      public final Object object
      The original edge in the source Graph.
    • edgeNode

      public final boolean edgeNode
      true iff this edge corresponds to a node in the source Graph which represents an edge.
    • weight

      public final float weight
      The edge weight.
    • source

      public final Node source
      The source node of this edge.
    • target

      public final Node target
      The target node of this edge.
    • width

      public float width
      The width of the 2D-visualization. May be 0.
    • height

      public float height
      The height of the 2D-visualization. May be 0.
    • isAccessed

      public boolean isAccessed
  • Method Details

    • getNext

      public Edge getNext(Node parent)
      Returns the next edge in parent's list of edges
      Parameters:
      parent - a node
      Returns:
      the next edge in parent's list of edges
      See Also:
    • getNeighbor

      public Node getNeighbor(Node n)
      Returns the neighbor of n.
      Parameters:
      n - one of the two incident nodes of this edge
      Returns:
      the other incident node