Class MapGraph.MapGraphIterator
- java.lang.Object
-
- edu.isi.pegasus.planner.partitioner.graph.MapGraph.MapGraphIterator
-
- All Implemented Interfaces:
java.util.Iterator
- Enclosing class:
- MapGraph
protected class MapGraph.MapGraphIterator extends java.lang.Object implements java.util.IteratorAn inner iterator class that traverses through the Graph. The traversal of the graph is a modified BFS. A node is added to the queue only when all it's parents have been added to the queue.
-
-
Field Summary
Fields Modifier and Type Field Description private intmCurrentDepthThe current depth of the nodes that are being traversed in the BFS.private java.util.ListmLevelListA temporary list that stores all the nodes on a particular level.private java.util.LinkedListmQueueThe first in first out queue, that manages the set of gray vertices in a breadth first search.
-
Constructor Summary
Constructors Constructor Description MapGraphIterator()The default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()Always returns false, as an empty iterator.java.lang.Objectnext()Returns the next object in the traversal order.voidremove()Method is not supported.
-
-
-
Field Detail
-
mQueue
private java.util.LinkedList mQueue
The first in first out queue, that manages the set of gray vertices in a breadth first search.
-
mCurrentDepth
private int mCurrentDepth
The current depth of the nodes that are being traversed in the BFS.
-
mLevelList
private java.util.List mLevelList
A temporary list that stores all the nodes on a particular level.
-
-
Method Detail
-
hasNext
public boolean hasNext()
Always returns false, as an empty iterator.- Specified by:
hasNextin interfacejava.util.Iterator- Returns:
- true if there are still nodes in the queue.
-
next
public java.lang.Object next()
Returns the next object in the traversal order.- Specified by:
nextin interfacejava.util.Iterator- Returns:
- null
-
remove
public void remove()
Method is not supported.- Specified by:
removein interfacejava.util.Iterator
-
-