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::dpMain ( )
inline

Definition at line 291 of file dp.h.

◆ ~dpMain()

virtual dpMain::~dpMain ( )
inlinevirtual

Definition at line 297 of file dp.h.

Member Function Documentation

◆ add_node()

void dpMain::add_node ( dpNode _n)
inlineprotected

Definition at line 367 of file dp.h.

◆ add_queue()

void dpMain::add_queue ( dpQueue _q)
inlineprotected

Definition at line 375 of file dp.h.

◆ BestGoal()

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

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

Definition at line 336 of file dp.h.

◆ ClearAll()

virtual void dpMain::ClearAll ( )
inlinevirtual

Definition at line 329 of file dp.h.

◆ DumpAll()

void dpMain::DumpAll ( ostream &  ost)
inline

Definition at line 351 of file dp.h.

◆ DumpQueue()

void dpMain::DumpQueue ( ostream &  ost)
inline

Definition at line 356 of file dp.h.

◆ DumpTrajectory()

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

Definition at line 164 of file dp.cpp.

◆ is_best()

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

Definition at line 133 of file dp.cpp.

◆ next_breadth()

dpNode* dpMain::next_breadth ( dpNode refnode)
inlineprotected

Definition at line 397 of file dp.h.

◆ NumGoals()

int dpMain::NumGoals ( )
inline

Definition at line 348 of file dp.h.

◆ NumNodes()

int dpMain::NumNodes ( )
inline

Definition at line 345 of file dp.h.

◆ remove_node()

void dpMain::remove_node ( dpNode node)
inlineprotected

Definition at line 387 of file dp.h.

◆ remove_node_single()

void dpMain::remove_node_single ( dpNode node)
inlineprotected

Definition at line 391 of file dp.h.

◆ reset()

void dpMain::reset ( )
inlineprotected

Definition at line 361 of file dp.h.

◆ Search() [1/2]

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.

◆ Search() [2/2]

int dpMain::Search ( double  max_time)

Dijkstra or A* search with maximum search time.

◆ SearchBreadthFirst()

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

Breadth-first search.

Definition at line 74 of file dp.cpp.

◆ SearchDepthFirst()

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

Depth-first search.

Definition at line 56 of file dp.cpp.

◆ SetStartNode()

void dpMain::SetStartNode ( dpNode _n)
inline

Set the initial node for search.

Definition at line 303 of file dp.h.

◆ smallest_queue()

dpQueue* dpMain::smallest_queue ( )
inlineprotected

Definition at line 383 of file dp.h.

Friends And Related Function Documentation

◆ dpNode

friend class dpNode
friend

Definition at line 289 of file dp.h.

◆ dpQueue

friend class dpQueue
friend

Definition at line 288 of file dp.h.

Member Data Documentation

◆ n_goals

int dpMain::n_goals
protected

Definition at line 403 of file dp.h.

◆ n_nodes

int dpMain::n_nodes
protected

Definition at line 404 of file dp.h.

◆ start_node

dpNode* dpMain::start_node
protected

Definition at line 402 of file dp.h.

◆ top_queue

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 Sep 8 2022 02:24:07