Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
dpMain Class Reference

#include <dp.h>

Public Member Functions

dpNodeBestGoal (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)
 
dpNodenext_breadth (dpNode *refnode)
 
void remove_node (dpNode *node)
 
void remove_node_single (dpNode *node)
 
void reset ()
 
dpQueuesmallest_queue ()
 

Protected Attributes

int n_goals
 
int n_nodes
 
dpNodestart_node
 
dpQueuetop_queue
 

Friends

class dpNode
 
class dpQueue
 

Detailed Description

Main class for the search.

Definition at line 286 of file dp.h.

Constructor & Destructor Documentation

dpMain::dpMain ( )
inline

Definition at line 291 of file dp.h.

virtual dpMain::~dpMain ( )
inlinevirtual

Definition at line 297 of file dp.h.

Member Function Documentation

void dpMain::add_node ( dpNode _n)
inlineprotected

Definition at line 367 of file dp.h.

void dpMain::add_queue ( dpQueue _q)
inlineprotected

Definition at line 375 of file dp.h.

dpNode* dpMain::BestGoal ( dpNode ref = 0)
inline

Extract the goal with the smallest cost (if any).

Definition at line 336 of file dp.h.

virtual void dpMain::ClearAll ( )
inlinevirtual

Definition at line 329 of file dp.h.

void dpMain::DumpAll ( ostream &  ost)
inline

Definition at line 351 of file dp.h.

void dpMain::DumpQueue ( ostream &  ost)
inline

Definition at line 356 of file dp.h.

void dpMain::DumpTrajectory ( ostream &  ost,
dpNode goal 
)

Definition at line 164 of file dp.cpp.

int dpMain::is_best ( dpNode ref,
dpNode target 
)
protected

Definition at line 133 of file dp.cpp.

dpNode* dpMain::next_breadth ( dpNode refnode)
inlineprotected

Definition at line 397 of file dp.h.

int dpMain::NumGoals ( )
inline

Definition at line 348 of file dp.h.

int dpMain::NumNodes ( )
inline

Definition at line 345 of file dp.h.

void dpMain::remove_node ( dpNode node)
inlineprotected

Definition at line 387 of file dp.h.

void dpMain::remove_node_single ( dpNode node)
inlineprotected

Definition at line 391 of file dp.h.

void dpMain::reset ( )
inlineprotected

Definition at line 361 of file dp.h.

int dpMain::Search ( int  _max_nodes = -1,
int  _max_goals = -1 
)

Dijkstra or A* search: find the node with the smallest cost.

Dijkstra or A* search: find the node with the smallest cost until the number of nodes exceeds _max_nodes or the number of goalds exceeds _max_goals.

dp.cpp Create: Katsu Yamane, 05.11.16

Definition at line 17 of file dp.cpp.

int dpMain::Search ( double  max_time)

Dijkstra or A* search with maximum search time.

int dpMain::SearchBreadthFirst ( int  _max_nodes = -1,
int  _max_goals = -1 
)

Breadth-first search.

Definition at line 74 of file dp.cpp.

int dpMain::SearchDepthFirst ( int  _max_nodes = -1,
int  _max_goals = -1 
)

Depth-first search.

Definition at line 56 of file dp.cpp.

void dpMain::SetStartNode ( dpNode _n)
inline

Set the initial node for search.

Definition at line 303 of file dp.h.

dpQueue* dpMain::smallest_queue ( )
inlineprotected

Definition at line 383 of file dp.h.

Friends And Related Function Documentation

friend class dpNode
friend

Definition at line 289 of file dp.h.

friend class dpQueue
friend

Definition at line 288 of file dp.h.

Member Data Documentation

int dpMain::n_goals
protected

Definition at line 403 of file dp.h.

int dpMain::n_nodes
protected

Definition at line 404 of file dp.h.

dpNode* dpMain::start_node
protected

Definition at line 402 of file dp.h.

dpQueue* dpMain::top_queue
protected

Definition at line 401 of file dp.h.


The documentation for this class was generated from the following files:


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Sat Apr 13 2019 02:14:28