Aggiunti alcuni esercizi

This commit is contained in:
2014-06-03 23:12:17 +02:00
parent 01c626d0e0
commit 7f2845fe2d
32 changed files with 1719 additions and 330 deletions

View File

@@ -12,7 +12,7 @@ import exceptions.InvalidKeyException;
*/
public class DFS<V, E, I, R> {
protected Graph<V, E> graph; // The graph being traversed
protected Vertex<V> start; // The start vertex for the DFS
protected Vertex<V> start; // The start_static_methods vertex for the DFS
protected I info; // Information object passed to DFS
protected R visitResult; // The result of a recursive traversal call
protected static Object STATUS = new Object(); // The status attribute
@@ -22,7 +22,7 @@ public class DFS<V, E, I, R> {
/** Execute a depth first search traversal on graph g, starting
* from a start vertex s, passing in an information object (in) */
* from a start_static_methods vertex s, passing in an information object (in) */
public R execute(Graph<V, E> g, Vertex<V> s, I in) throws InvalidKeyException {
graph = g;
start = s;