public abstract class DFSDiscoverTimeIterator<T> extends ArrayList<T> implements Iterator<T>
NumberedGraph, return an enumeration of
the nodes of the graph in order of increasing discover time. This class follows the outNodes of
the graph nodes to define the graph, but this behavior can be changed by overriding the
getConnected method.modCount| Constructor and Description |
|---|
DFSDiscoverTimeIterator() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Iterator<? extends T> |
getConnected(T n)
get the out edges of a given node
|
protected abstract Iterator<? extends T> |
getPendingChildren(T n) |
boolean |
hasNext()
Return whether there are any more nodes left to enumerate.
|
protected void |
init(Iterator<? extends T> nodes)
subclass constructors must call this!
|
protected void |
init(T N)
subclass constructors must call this!
|
T |
next()
Find the next graph node in discover time order.
|
void |
remove() |
protected abstract void |
setPendingChildren(T v,
Iterator<? extends T> iterator) |
protected void |
visitEdge(T from,
T to) |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeequals, hashCodecontainsAll, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitforEachRemainingcontainsAll, equals, hashCodeparallelStream, streamprotected void init(T N)
public boolean hasNext()
public T next() throws NoSuchElementException
next in interface Iterator<T>NoSuchElementExceptionprotected abstract Iterator<? extends T> getConnected(T n)
n - the node of which to get the out edgespublic void remove()
throws UnimplementedError
remove in interface Iterator<T>UnimplementedError