org.jgrapht.traverse
Class CrossComponentIterator<V,E,D>
- java.lang.Object
-
- org.jgrapht.traverse.AbstractGraphIterator<V,E>
-
- org.jgrapht.traverse.CrossComponentIterator<V,E,D>
-
- Type Parameters:
V- vertex typeE- edge typeD- type of data associated to seen vertices
- All Implemented Interfaces:
- java.util.Iterator<V>, GraphIterator<V,E>
- Direct Known Subclasses:
- BreadthFirstIterator, ClosestFirstIterator, DepthFirstIterator, TopologicalOrderIterator
public abstract class CrossComponentIterator<V,E,D> extends AbstractGraphIterator<V,E>
Provides a cross-connected-component traversal functionality for iterator subclasses.- Since:
- Jan 31, 2004
-
-
Constructor Summary
Constructors Constructor and Description CrossComponentIterator(Graph<V,E> g, V startVertex)Creates a new iterator for the specified graph.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description Graph<V,E>getGraph()booleanhasNext()Vnext()-
Methods inherited from class org.jgrapht.traverse.AbstractGraphIterator
addTraversalListener, isCrossComponentTraversal, isReuseEvents, remove, removeTraversalListener, setCrossComponentTraversal, setReuseEvents
-
-
-
-
Constructor Detail
-
CrossComponentIterator
public CrossComponentIterator(Graph<V,E> g, V startVertex)
Creates a new iterator for the specified graph. Iteration will start at the specified start vertex. If the specified start vertex isnull, Iteration will start at an arbitrary graph vertex.- Parameters:
g- the graph to be iterated.startVertex- the vertex iteration to be started.- Throws:
java.lang.IllegalArgumentException- ifg==nullor does not containstartVertex
-
-
DataMelt 3.0 © DataMelt by jWork.ORG