Class AbstractGraphTraversal<V>

    • Constructor Detail

      • AbstractGraphTraversal

        public AbstractGraphTraversal​(Graph<V> graph)
        Instantiates a new Abstract graph traversal.
        Parameters:
        graph - the graph
    • Method Detail

      • getGraph

        protected Graph<V> getGraph()
      • iterator

        public final Iterator<V> iterator​(V startingPoint)
        Description copied from interface: GraphTraversal
        An iterator to traverse the graph starting at the given vertex
        Specified by:
        iterator in interface GraphTraversal<V>
        Parameters:
        startingPoint - the starting point
        Returns:
        the iterator
      • add

        protected abstract void add​(Deque<V> deque,
                                    V vertex)
        Add.
        Parameters:
        deque - the deque
        vertex - the vertex
      • nextV

        protected abstract V nextV​(Deque<V> deque)
        Next v v.
        Parameters:
        deque - the deque
        Returns:
        the v