|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.rollerjm.graph.PathFinder
Title: graphs
Description: contains all the search methods.
Copyright: Copyright (c) 2002
Company:
| Field Summary | |
private java.lang.Object |
destination
Where we gonna go now ? |
private Dijkstra |
dijkstra
We need our favourite algorithm |
private IGraph |
graph
the graph we are gonna to explore |
private int |
maxDistance
The total distance. |
private int |
maxLength
The lenght of a path is different from its distance. |
private java.util.ArrayList |
solutionsList
list of Path |
| Constructor Summary | |
PathFinder(IGraph graph)
|
|
| Method Summary | |
private void |
findPaths(java.lang.Object start,
java.lang.Object destination,
int maxLength)
Explore the graph from a start vertex to a destination vertex and find all the paths which have a length <= maxLength. |
java.util.List |
findPathsWithExactLength(java.lang.Object start,
java.lang.Object destination,
int exactLength)
|
java.util.List |
findPathsWithMaximumDistance(java.lang.Object start,
java.lang.Object destination,
int maxDistance)
Explore the graph from a start vertex to a destination vertex and find all the paths which have a total distance <= maxDistance. |
java.util.List |
findPathsWithMaximumLength(java.lang.Object start,
java.lang.Object destination,
int maxLength)
|
Path |
getShortestPath(java.lang.Object start,
java.lang.Object destination)
wrapper around Dijkstra method |
int |
getShortestWeightDistance(java.lang.Object start,
java.lang.Object destination)
wrapper around Dijkstra method |
private void |
searchDistance(Path path)
Recursive method. |
private void |
searchLength(Path path)
Recursive method. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private IGraph graph
private Dijkstra dijkstra
private java.lang.Object destination
private int maxLength
private int maxDistance
private java.util.ArrayList solutionsList
| Constructor Detail |
public PathFinder(IGraph graph)
graph - | Method Detail |
public int getShortestWeightDistance(java.lang.Object start,
java.lang.Object destination)
start - destination -
public Path getShortestPath(java.lang.Object start,
java.lang.Object destination)
start - destination -
public java.util.List findPathsWithMaximumLength(java.lang.Object start,
java.lang.Object destination,
int maxLength)
start - destination - maxLength -
public java.util.List findPathsWithExactLength(java.lang.Object start,
java.lang.Object destination,
int exactLength)
start - destination - exactLength -
public java.util.List findPathsWithMaximumDistance(java.lang.Object start,
java.lang.Object destination,
int maxDistance)
start - destination - maxDistance -
private void findPaths(java.lang.Object start,
java.lang.Object destination,
int maxLength)
start - destination - maxLength - private void searchLength(Path path)
path - private void searchDistance(Path path)
path -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||