#include <dp.h>
Public Member Functions | |
dpNode * | BestGoal (dpNode *ref=0) |
Extract the goal with the smallest cost (if any). More... | |
virtual void | ClearAll () |
dpMain () | |
void | DumpAll (ostream &ost) |
void | DumpQueue (ostream &ost) |
void | DumpTrajectory (ostream &ost, dpNode *goal) |
int | NumGoals () |
int | NumNodes () |
void | SetStartNode (dpNode *_n) |
Set the initial node for search. More... | |
virtual | ~dpMain () |
Search functions. | |
int | Search (int _max_nodes=-1, int _max_goals=-1) |
Dijkstra or A* search: find the node with the smallest cost. More... | |
int | Search (double max_time) |
Dijkstra or A* search with maximum search time. More... | |
int | SearchDepthFirst (int _max_nodes=-1, int _max_goals=-1) |
Depth-first search. More... | |
int | SearchBreadthFirst (int _max_nodes=-1, int _max_goals=-1) |
Breadth-first search. More... | |
Protected Member Functions | |
void | add_node (dpNode *_n) |
void | add_queue (dpQueue *_q) |
int | is_best (dpNode *ref, dpNode *target) |
dpNode * | next_breadth (dpNode *refnode) |
void | remove_node (dpNode *node) |
void | remove_node_single (dpNode *node) |
void | reset () |
dpQueue * | smallest_queue () |
Protected Attributes | |
int | n_goals |
int | n_nodes |
dpNode * | start_node |
dpQueue * | top_queue |
Friends | |
class | dpNode |
class | dpQueue |
int dpMain::Search | ( | double | max_time | ) |
Dijkstra or A* search with maximum search time.