|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Path
Path.java This interface is used to implement Prim's and Djikstra's algorithms over a weighted, undirected Graph.
Method Summary | |
---|---|
int |
getMinSpanningTree(Graph g)
Finds the minimum weight of a spoanning tree for the given graph. |
int[] |
getShortestPaths(Graph g,
int source)
Runs Dijkstra's algorithm on a given undirected, non-negative weighted graph to find the distances to all vertices from the specified source vertex |
Method Detail |
---|
int getMinSpanningTree(Graph g)
g
- the Graph to be searched. Assume that an edge weight of 0 signifies that the edge does not exist.
int[] getShortestPaths(Graph g, int source)
g
- the Graph to be searched. Assume that an edge weight of 0 signifies that the edge does not exist.source
- the vertex on which to start the search
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |