|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectmascoptLib.algos.digraph.KShortestPaths
| Field Summary | |
static String |
NAME_OF_VALUE
The string used to get double values on arcs. |
| Constructor Summary | |
KShortestPaths(DiGraph g,
int k)
Constructor of KShortestPaths. |
|
| Method Summary | |
DiPath |
getShortestPath(int k)
Return the k-th path computed. |
double |
getWeight(int k)
Returns the weight of the k-th path. |
int |
numberOfComputedPaths()
Return the number of computed paths. |
void |
printComputedPaths()
Prints all the computed paths. |
void |
run(Vertex s,
Vertex t)
Runs the computation of k shortests paths between s and t. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static String NAME_OF_VALUE
| Constructor Detail |
public KShortestPaths(DiGraph g,
int k)
g - the graph to use to find paths.k - the number of paths to find.| Method Detail |
public void run(Vertex s,
Vertex t)
public DiPath getShortestPath(int k)
k - the number of the path (start at 0).
public int numberOfComputedPaths()
public void printComputedPaths()
public double getWeight(int k)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||