V - public interface GraphAlgorithmObserver<V>
| Modifier and Type | Method and Description |
|---|---|
void |
notifyBFSHasBegun()
Called by the graph to notify this Observer that
a Breadth-First Search has been initiated.
|
void |
notifyDFSHasBegun()
Called by the graph to notify this Observer that
a Depth-First-Search has been initiated.
|
void |
notifyDijkstraHasBegun()
Called by the graph to notify this observer that
Dijkstra's algorithm has begun.
|
void |
notifyDijkstraIsOver(java.util.List<V> path)
Called by the graph to notify this observer that
Dijkstra's algorithm is over.
|
void |
notifyDijkstraVertexFinished(V vertexAddedToFinishedSet,
java.lang.Integer costOfPath)
Called by the graph to notify this observer that
a vertex has been added to the "Finished Set"
during Dijkstra's algorithm.
|
void |
notifySearchIsOver()
Called by the graph to notify this observer that
the search (either DFS or BFS) is over.
|
void |
notifyVisit(V vertexBeingVisited)
Called by the graph to notify this Observer that
a vertex is being "visited" during either DFS or BFS.
|
void notifyDFSHasBegun()
void notifyBFSHasBegun()
void notifyVisit(V vertexBeingVisited)
vertexBeingVisited - void notifySearchIsOver()
void notifyDijkstraHasBegun()
void notifyDijkstraVertexFinished(V vertexAddedToFinishedSet, java.lang.Integer costOfPath)
vertexAddedToFinishedSet - costOfPath - void notifyDijkstraIsOver(java.util.List<V> path)
Called by the graph to notify this observer that Dijkstra's algorithm is over.
path - A list of Vertices that are connected along edges,
beginning with the "starting vertex" and ending with the
"finishing vertex". This will be the optimal (lowest cost)
path from start to finish.