|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpathfinder.JPathFinder
pathfinder.RandomPathFinder
public class RandomPathFinder
An example class that runs random path search (without any memory) instead of any requested search
Constructor Summary | |
---|---|
RandomPathFinder()
|
Method Summary | |
---|---|
static void |
main(java.lang.String[] args)
|
void |
performBFS(int start,
int stop,
JPFMap map)
implements the breadth first search (performBFS) path search - searches a road from given start to target city |
void |
performDFS(int start,
int stop,
JPFMap map)
implements the depth first search (performDFS) path search - searches a road from given start to target city |
void |
performRandomSearch(int start,
int stop,
JPFMap map)
implements the random path search - searches a road from given start to target city but does not display the correct path (uses no memory) |
void |
searchForShortestPath(int start,
int stop,
JPFMap map)
implements the A* path search - searches shortest road from given start to target city |
void |
searchForShortestTime(int start,
int stop,
JPFMap map)
implements the A* path search - searches fastest road from given start to target city |
Methods inherited from class pathfinder.JPathFinder |
---|
clearInfoArea, inform, setInformationArea, showGUI, showGUI, showGUI, showGUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RandomPathFinder()
Method Detail |
---|
public void performRandomSearch(int start, int stop, JPFMap map)
start
- id of starting citystop
- id of target citymap
- the map to be searchedpublic void performDFS(int start, int stop, JPFMap map)
JPathFinder
performDFS
in class JPathFinder
start
- id of starting citystop
- id of target citymap
- the map to be searchedpublic void performBFS(int start, int stop, JPFMap map)
JPathFinder
performBFS
in class JPathFinder
start
- id of starting citystop
- id of target citymap
- the map to be searchedpublic void searchForShortestPath(int start, int stop, JPFMap map)
JPathFinder
searchForShortestPath
in class JPathFinder
start
- id of starting citystop
- id of target citymap
- the map to be searchedpublic void searchForShortestTime(int start, int stop, JPFMap map)
JPathFinder
searchForShortestTime
in class JPathFinder
start
- id of starting citystop
- id of target citymap
- the map to be searchedpublic static void main(java.lang.String[] args)
args
- the command line arguments
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |