public class DFSAllPathsFinder<T> extends DFSPathFinder<T>
DFSPathFinder to discover all paths from a set of root nodes
to nodes passing some Predicate.
Note that this code performs work that is potentially exponential in the size
of the underlying graph, using exponential space. It most likely won't work
even for graphs of moderate size.G, pendingChildren, serialVersionUIDcapacityIncrement, elementCount, elementDatamodCount| Constructor and Description |
|---|
DFSAllPathsFinder(Graph<T> G,
Iterator<T> nodes,
Predicate<T> f) |
DFSAllPathsFinder(Graph<T> G,
T N,
Predicate<T> f) |
| Modifier and Type | Method and Description |
|---|---|
protected Iterator<? extends T> |
getConnected(T n)
get the out edges of a given node
|
protected Iterator<? extends T> |
getPendingChildren(T n)
Method getPendingChildren.
|
protected void |
setPendingChildren(T v,
Iterator<? extends T> iterator)
Method setPendingChildren.
|
currentPath, find, hasNextadd, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, forEach, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeIf, removeRange, replaceAll, retainAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, toString, trimToSizefinalize, getClass, notify, notifyAll, wait, wait, waitparallelStream, streampublic DFSAllPathsFinder(Graph<T> G, T N, Predicate<T> f) throws IllegalArgumentException
IllegalArgumentExceptionprotected Iterator<? extends T> getConnected(T n)
DFSPathFindergetConnected in class DFSPathFinder<T>n - the node of which to get the out edgesprotected Iterator<? extends T> getPendingChildren(T n)
DFSPathFindergetPendingChildren in class DFSPathFinder<T>protected void setPendingChildren(T v, Iterator<? extends T> iterator)
DFSPathFindersetPendingChildren in class DFSPathFinder<T>