Class DFSAllPathsFinder<T>

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<T>, java.util.Collection<T>, java.util.List<T>, java.util.RandomAccess

    public class DFSAllPathsFinder<T>
    extends DFSPathFinder<T>
    Extends 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.
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class java.util.AbstractList

        modCount
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.util.Iterator<? extends T> getConnected​(T n)
      get the out edges of a given node
      protected java.util.Iterator<? extends T> getPendingChildren​(T n)
      Method getPendingChildren.
      protected void setPendingChildren​(T v, java.util.Iterator<? extends T> iterator)
      Method setPendingChildren.
      • Methods inherited from class java.util.ArrayList

        add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
      • Methods inherited from class java.util.AbstractCollection

        containsAll, toString
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, stream, toArray
      • Methods inherited from interface java.util.List

        containsAll
    • Constructor Detail

      • DFSAllPathsFinder

        public DFSAllPathsFinder​(Graph<T> G,
                                 java.util.Iterator<T> nodes,
                                 java.util.function.Predicate<T> f)
      • DFSAllPathsFinder

        public DFSAllPathsFinder​(Graph<T> G,
                                 T N,
                                 java.util.function.Predicate<T> f)
                          throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
    • Method Detail

      • getConnected

        protected java.util.Iterator<? extends T> getConnected​(T n)
        Description copied from class: DFSPathFinder
        get the out edges of a given node
        Overrides:
        getConnected in class DFSPathFinder<T>
        Parameters:
        n - the node of which to get the out edges
        Returns:
        the out edges
      • getPendingChildren

        protected java.util.Iterator<? extends T> getPendingChildren​(T n)
        Description copied from class: DFSPathFinder
        Method getPendingChildren.
        Overrides:
        getPendingChildren in class DFSPathFinder<T>
        Returns:
        Object
      • setPendingChildren

        protected void setPendingChildren​(T v,
                                          java.util.Iterator<? extends T> iterator)
        Description copied from class: DFSPathFinder
        Method setPendingChildren.
        Overrides:
        setPendingChildren in class DFSPathFinder<T>