![]() |
AuD
Lecture 'Algorithmen und Datenstrukturen' (code examples)
|
implementation of the A* algorithm More...
Public Member Functions | |
AStarShortestPath (MyGraph g, MyNode s1) | |
create instance with destination s1 More... | |
AStarShortestPath (MyGraph g) | |
String | name () |
get traversal name More... | |
void | start (MyNode s0) |
find shortest path to destination More... | |
void | start (MyNode s0, MyNode s1) |
find shortest path from s0 to s1 More... | |
![]() | |
Traversal (MyGraph g) | |
initiate traversal of g More... | |
abstract String | name () |
get traversal name More... | |
abstract void | start (MyNode s0) |
start traversal at node s0 More... | |
void | showMark (MyNode node) |
callback to give visual feedback on marking a node More... | |
Protected Member Functions | |
double | h (MyNode node) |
heuristic that guides search More... | |
![]() | |
void | initialize () |
initialize graph for traversal (reset all attributes), provided for convenience to be called by start More... | |
Protected Attributes | |
Comparator< MyNode > | compareNodes |
comparator for {#link aud.PriorityQueue}: compares f-values (in contrast to {#link DijkstraShortestPath} More... | |
![]() | |
MyGraph | g_ = null |
int | time_ = 0 |
Additional Inherited Members | |
![]() | |
SingleStepper | singlestepper = null |
may halt if single stepper was set More... | |
int | nsteps = 1 |
halt every nsteps steps in time_ More... | |
int | verbose = 0 |
set verbosity (extra output if >0) More... | |
implementation of the A* algorithm
Definition at line 10 of file AStarShortestPath.java.
create instance with destination s1
Definition at line 27 of file AStarShortestPath.java.
Definition at line 32 of file AStarShortestPath.java.
|
protected |
heuristic that guides search
Definition at line 37 of file AStarShortestPath.java.
String aud.example.graph.AStarShortestPath.name | ( | ) |
get traversal name
Reimplemented from aud.example.graph.Traversal.
Definition at line 43 of file AStarShortestPath.java.
void aud.example.graph.AStarShortestPath.start | ( | MyNode | s0 | ) |
find shortest path to destination
Reimplemented from aud.example.graph.Traversal.
Definition at line 46 of file AStarShortestPath.java.
find shortest path from s0
to s1
Definition at line 145 of file AStarShortestPath.java.
|
protected |
comparator for {#link aud.PriorityQueue}: compares f-values (in contrast to {#link DijkstraShortestPath}
Definition at line 18 of file AStarShortestPath.java.