package org.javaan.model;

import java.util.Set;

import org.javaan.graph.GraphVisitor;

/**
 * Abstraction of the graph implementation. Prevents direct dependencies 
 * to internal graph structures and provides convenience functions.
 */
public interface GraphView<V, E> {
	
	Set<V> vertexSet();
	
	Set<E> edgeSet();
	
	Set<V> targetVerticesOf(V vertex);

	Set<V> sourceVerticesOf(V vertex);

	Set<V> successorsOf(V vertex);

	Set<V> predecessorsOf(V vertex);

	void traverse(V startVertex, GraphVisitor<V, E> visitor, boolean reverse);

	Set<V> collectLeaves(V startVertex, boolean reverse);
}
@@ -469,16 +469,116 @@
 traverse
+DepthFirst(V startVertex, GraphVisitor%3CV, E%3E visitor, boolean reverse);%0A%09%0A%09void traverseBreadthFirst
 (V start

extend API of graph view to support breadth first and depth first traversal