|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Search
Search.java This interface specifies methods based on a Breadth First Search and Depth First Search over a directed Graph.
| Method Summary | |
|---|---|
int[] |
getConnectedTree(Graph g,
int startVertex)
Runs a BFS on a given directed, unweighted graph. |
int[] |
getDistances(Graph g,
int startVertex)
Runs a BFS on a given directed, unweighted graph to find the distances of vertices from the start vertex. |
int[][] |
getTimes(Graph g,
int startVertex)
Runs a DFS on a given directed, unweighted graph to find the start time and finish time for each vertex |
| Method Detail |
|---|
int[] getConnectedTree(Graph g,
int startVertex)
g - the Graph to be searchedstartVertex - the vertex on which to start the search
int[] getDistances(Graph g,
int startVertex)
g - the Graph to be searchedstartVertex - the vertex on which to start the search
int[][] getTimes(Graph g,
int startVertex)
g - the Graph to be searchedstartVertex - the vertex on which to start the search
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||