src/main/java/org/thegalactic/dgraph/ConcreteDGraph.java
private ArrayList<Node<N>>[] depthFirstSearch() {
        TreeSet<Node<N>> visited = new TreeSet<Node<N>>();
        ArrayList<Node<N>>[] arrayVisited = new ArrayList[2];
        ArrayList<Node<N>> first = new ArrayList<Node<N>>();
        ArrayList<Node<N>> last = new ArrayList<Node<N>>();
        for (Node<N> node : this.nodes) {
            if (!visited.contains(node)) {
                arrayVisited = this.depthFirstSearch(node, visited, null);
                visited.addAll(arrayVisited[0]);
                first.addAll(arrayVisited[0]);
                last.addAll(arrayVisited[1]);
            }
        }
        arrayVisited[0] = first;
        arrayVisited[1] = last;
        return arrayVisited;
    }
/**
     * Returns a two cells array containing the first visited sort on the nodes,
     * and the last visited sort on the nodes, by a depth first search.
     *
     * @return The array
     */
Returns a two cells array containing the first visited sort on the nodes,
and the last visited sort on the nodes, by a depth first search.

@return The array
Returns a two cells array containing the first visited sort on the nodes and the last visited sort on the nodes by a depth first search . @return The array
private ArrayList<Node<N>>[] depthFirstSearch() {
        TreeSet<Node<N>> visited = new TreeSet<Node<N>>();
        ArrayList<Node<N>>[] arrayVisited = new ArrayList[2];
        ArrayList<Node<N>> first = new ArrayList<Node<N>>();
        ArrayList<Node<N>> last = new ArrayList<Node<N>>();
        for (Node<N> node : this.nodes) {
            if (!visited.contains(node)) {
                arrayVisited = this.depthFirstSearch(node, visited, null);
                visited.addAll(arrayVisited[0]);
                first.addAll(arrayVisited[0]);
                last.addAll(arrayVisited[1]);
            }
        }
        arrayVisited[0] = first;
        arrayVisited[1] = last;
        return arrayVisited;
    }
private ArrayList < Node < N > > [ ] depthFirstSearch ( ) { TreeSet < Node < N > > visited = new TreeSet < Node < N > > ( ) ; ArrayList < Node < N > > [ ] arrayVisited = new ArrayList [ 2 ] ; ArrayList < Node < N > > first = new ArrayList < Node < N > > ( ) ; ArrayList < Node < N > > last = new ArrayList < Node < N > > ( ) ; for ( Node < N > node : this . nodes ) { if ( ! visited . contains ( node ) ) { arrayVisited = this . depthFirstSearch ( node , visited , null ) ; visited . addAll ( arrayVisited [ 0 ] ) ; first . addAll ( arrayVisited [ 0 ] ) ; last . addAll ( arrayVisited [ 1 ] ) ; } } arrayVisited [ 0 ] = first ; arrayVisited [ 1 ] = last ; return arrayVisited ; }
Returns a two cells array containing the first visited sort on the nodes,
 and the last visited sort on the nodes, by a depth first search.
Returns a two cells array containing the first visited sort on the nodes and the last visited sort on the nodes by a depth first search .