y25.base
Class LayerEdge

java.lang.Object
  extended byy25.base.LayerEdge

public class LayerEdge
extends Object

A LayerEdge connects two Nodes that may reside inside different Graphs but that are all inside the same LayeredGraph.


Constructor Summary
protected LayerEdge(LayeredGraph lg, Node v, Node w)
          Creates a new layer edge that belongs to the given layered graph.
 
Method Summary
 LayeredGraph getLayeredGraph()
          Returns the layered graph this layer edge belongs to.
 Graph getSourceGraph()
          Returns the graph the source node of this layer edge belongs to.
 Graph getTargetGraph()
          Returns the graph the target node of this layer edge belongs to.
 Node source()
          Returns the source node of this layer edge.
 Node target()
          Returns the target node of this layer edge.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayerEdge

protected LayerEdge(LayeredGraph lg,
                    Node v,
                    Node w)
Creates a new layer edge that belongs to the given layered graph. The new edge e has source node v and target node w. Both the graph that v and the graph that w belong to have to belong to the given layered graph lg. It is allowed that both nodes lie in the same graph - they can even be identical, thereby creating a layer edge self-loop (as opposed to a normal self-loop).

Note that this sole constructor is made protected. This means that users should never create a layer edge by themselves but use the LayeredGraph.createLayerEdge(y.base.Node, y.base.Node) method instead.

Parameters:
lg - The layered graph the newly created edge will reside in.
v - The source node of the edge.
w - The target node of the edge.
Method Detail

getLayeredGraph

public LayeredGraph getLayeredGraph()
Returns the layered graph this layer edge belongs to.


getSourceGraph

public Graph getSourceGraph()
Returns the graph the source node of this layer edge belongs to.


getTargetGraph

public Graph getTargetGraph()
Returns the graph the target node of this layer edge belongs to.


source

public Node source()
Returns the source node of this layer edge.


target

public Node target()
Returns the target node of this layer edge.