Public Member Functions | Protected Member Functions | Protected Attributes | Friends
dpMain Class Reference

#include <dp.h>

List of all members.

Public Member Functions

dpNodeBestGoal (dpNode *ref=0)
 Extract the goal with the smallest cost (if any).
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.
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.
int Search (double max_time)
 Dijkstra or A* search with maximum search time.
int SearchDepthFirst (int _max_nodes=-1, int _max_goals=-1)
 Depth-first search.
int SearchBreadthFirst (int _max_nodes=-1, int _max_goals=-1)
 Breadth-first search.

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 ( ) [inline, virtual]

Definition at line 297 of file dp.h.


Member Function Documentation

void dpMain::add_node ( dpNode _n) [inline, protected]

Definition at line 367 of file dp.h.

void dpMain::add_queue ( dpQueue _q) [inline, protected]

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 ( ) [inline, virtual]

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) [inline, protected]

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) [inline, protected]

Definition at line 387 of file dp.h.

void dpMain::remove_node_single ( dpNode node) [inline, protected]

Definition at line 391 of file dp.h.

void dpMain::reset ( ) [inline, protected]

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 ( ) [inline, protected]

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 Thu Apr 11 2019 03:30:21