Class LabeledDiGraph.LabeledBiDiNavigator<Vertex,Label>

  extended by jpaul.Graphs.LabeledDiGraph.LabeledForwardNavigator<Vertex,Label>
      extended by jpaul.Graphs.LabeledDiGraph.LabeledBiDiNavigator<Vertex,Label>
All Implemented Interfaces:
BiDiNavigator<Vertex>, ForwardNavigator<Vertex>
Enclosing class:

public abstract static class LabeledDiGraph.LabeledBiDiNavigator<Vertex,Label>
extends LabeledDiGraph.LabeledForwardNavigator<Vertex,Label>
implements BiDiNavigator<Vertex>

Bidirectional iterator into a labeled graph. Each labeled navigator is also a normal navigator: we just strip the labels off the arcs.

Constructor Summary
Method Summary
abstract  java.util.List<Pair<Vertex,Label>> lprev(Vertex v)
          Returns the list of the arcs that enter into the vertex v.
 java.util.List<Vertex> prev(Vertex v)
          Returns the predecessors of vertex.
Methods inherited from class jpaul.Graphs.LabeledDiGraph.LabeledForwardNavigator
lnext, next
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface jpaul.Graphs.ForwardNavigator

Constructor Detail


public LabeledDiGraph.LabeledBiDiNavigator()
Method Detail


public abstract java.util.List<Pair<Vertex,Label>> lprev(Vertex v)
Returns the list of the arcs that enter into the vertex v. Each arc is modeled as a pair of the source vertex and the arc label.


public java.util.List<Vertex> prev(Vertex v)
Description copied from interface: BiDiNavigator
Returns the predecessors of vertex. Returns a list (instead of a set) in order to support graphs and graph algorithms that care about the order of the out-going arcs; e.g., consider an IF node in a control-flow-graph: usually, the first outgoing arc is the TRUE branch, while the second is the FALSE branch.

Specified by:
prev in interface BiDiNavigator<Vertex>

Copyright 2005 Alexandru Salcianu -