|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.upc.dama.dex.tasks.Task
edu.upc.dama.dex.tasks.CompositeTask
edu.upc.dama.dex.algorithms.ShortestPath
public abstract class ShortestPath
Any class implementing this abstract class can be used to solve the single pair shortest path problem, single-source pair shortest path problem, single-destination shortest path problem or all-pairs shortest path problem.
| Field Summary |
|---|
| Fields inherited from interface edu.upc.dama.dex.algorithms.Algorithm |
|---|
NAVIGATION_BACKWARD, NAVIGATION_FORWARD, NAVIGATION_UNDIRECTED |
| Constructor Summary | |
|---|---|
ShortestPath(Graph graph)
Creates a new instance of ShortestPath. |
|
| Method Summary | |
|---|---|
abstract void |
close()
Closes the instance. |
abstract void |
run()
Runs the algorithm in order to solve the shortest path problem. |
void |
setMaximumHops(int maxhops)
Sets the maximum hops restriction while traversing the graph in order to find the path, that is, the maximum depth of the graph traversal during the execution. |
| Methods inherited from class edu.upc.dama.dex.tasks.CompositeTask |
|---|
cancel, execute, init |
| Methods inherited from class edu.upc.dama.dex.tasks.Task |
|---|
main |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ShortestPath(Graph graph)
ShortestPath.
graph - Graph on which the path will be found.| Method Detail |
|---|
public abstract void run()
throws java.lang.Throwable
This method can be called only once.
java.lang.Throwablepublic abstract void close()
Once executed, the instance becomes invalid.
public void setMaximumHops(int maxhops)
It is possible to run the algorithm without specifying this parameter in order to avoid restricting the depth of the traversal.
maxhops - The number of hops allowed in the graph traversal while
running this algorithm.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||