jpaul.Graphs
Class LabeledDiGraph.LabeledForwardNavigator<Vertex,Label>

java.lang.Object
  extended by jpaul.Graphs.LabeledDiGraph.LabeledForwardNavigator<Vertex,Label>
All Implemented Interfaces:
ForwardNavigator<Vertex>
Direct Known Subclasses:
LabeledDiGraph.LabeledBiDiNavigator
Enclosing class:
LabeledDiGraph<Vertex,Label>

public abstract static class LabeledDiGraph.LabeledForwardNavigator<Vertex,Label>
extends java.lang.Object
implements ForwardNavigator<Vertex>

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


Constructor Summary
LabeledDiGraph.LabeledForwardNavigator()
           
 
Method Summary
abstract  java.util.List<Pair<Vertex,Label>> lnext(Vertex v)
          Returns the list of the arcs that exit vertex v.
 java.util.List<Vertex> next(Vertex v)
          Returns the successors of vertex.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LabeledDiGraph.LabeledForwardNavigator

public LabeledDiGraph.LabeledForwardNavigator()
Method Detail

lnext

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


next

public java.util.List<Vertex> next(Vertex v)
Description copied from interface: ForwardNavigator
Returns the successors of vertex. Returns a list (instead of a set) in order to support graphs and graph algorithms that care about the order of the in-coming arcs.

Specified by:
next in interface ForwardNavigator<Vertex>


Copyright 2005 Alexandru Salcianu - salcianu@alum.mit.edu