Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
dpNode Class Referenceabstract

#include <dp.h>

Inheritance diagram for dpNode:
Inheritance graph
[legend]

Public Member Functions

double AstarCost ()
 
dpNodeBrother ()
 
dpNodeChild ()
 
double Cost ()
 
int Depth (dpNode *target_p=0)
 
 dpNode ()
 
dpNodeGetParent (int id)
 
int ID ()
 
dpNodeParent ()
 
dpQueueQueue ()
 
double TotalAstarCost ()
 
double TotalCost ()
 
virtual ~dpNode ()
 

Protected Member Functions

void add_child (dpNode *n)
 
virtual void dump (ostream &ost)
 
void dump_all (ostream &ost)
 
void dump_trajectory (ostream &ost)
 
dpNodenext_breadth (dpNode *refnode)
 
dpNodenext_depth (dpNode *first_child=0)
 
int open (int _max_nodes, int _max_goals)
 
void remove ()
 
void remove_single ()
 
Virtual functions to be defined by subclass.
virtual int create_child_nodes (dpNode **&nodes)=0
 Create (potential) child nodes. More...
 
virtual double calc_cost ()=0
 Compute the local cost at the node. More...
 
virtual double calc_astar_cost (dpNode *potential_parent)
 Compute the A-star cost at the node (optional). More...
 
virtual int same_state (dpNode *refnode)=0
 Check if the node's state is the same as refnode. (to remove duplicates) More...
 
virtual int is_goal ()=0
 Check if the state is goal. More...
 

Protected Attributes

int active
 
double astar_cost
 
dpNodebrother
 
dpNodechild
 
double cost
 
int depth
 
dpMaindp_main
 
int id
 
dpNodeparent
 
dpQueuequeue
 
double total_astar_cost
 
double total_cost
 

Friends

class dpMain
 
class dpQueue
 

Detailed Description

Base class for search nodes.

Definition at line 29 of file dp.h.

Constructor & Destructor Documentation

◆ dpNode()

dpNode::dpNode ( )
inline

Definition at line 34 of file dp.h.

◆ ~dpNode()

virtual dpNode::~dpNode ( )
inlinevirtual

Definition at line 47 of file dp.h.

Member Function Documentation

◆ add_child()

void dpNode::add_child ( dpNode n)
protected

Definition at line 169 of file dp.cpp.

◆ AstarCost()

double dpNode::AstarCost ( )
inline

Definition at line 85 of file dp.h.

◆ Brother()

dpNode* dpNode::Brother ( )
inline

Definition at line 55 of file dp.h.

◆ calc_astar_cost()

virtual double dpNode::calc_astar_cost ( dpNode potential_parent)
inlineprotectedvirtual

Compute the A-star cost at the node (optional).

Reimplemented in LCPNode, and dpScheduleNode.

Definition at line 111 of file dp.h.

◆ calc_cost()

virtual double dpNode::calc_cost ( )
protectedpure virtual

Compute the local cost at the node.

Implemented in LCPNode, and dpScheduleNode.

◆ Child()

dpNode* dpNode::Child ( )
inline

Definition at line 58 of file dp.h.

◆ Cost()

double dpNode::Cost ( )
inline

Definition at line 79 of file dp.h.

◆ create_child_nodes()

virtual int dpNode::create_child_nodes ( dpNode **&  nodes)
protectedpure virtual

Create (potential) child nodes.

Create (potential) child nodes.

Parameters
[out]nodesarray of pointers to the child nodes

Implemented in LCPNode, and dpScheduleNode.

◆ Depth()

int dpNode::Depth ( dpNode target_p = 0)
inline

Definition at line 62 of file dp.h.

◆ dump()

virtual void dpNode::dump ( ostream &  ost)
inlineprotectedvirtual

Definition at line 143 of file dp.h.

◆ dump_all()

void dpNode::dump_all ( ostream &  ost)
inlineprotected

Definition at line 149 of file dp.h.

◆ dump_trajectory()

void dpNode::dump_trajectory ( ostream &  ost)
inlineprotected

Definition at line 145 of file dp.h.

◆ GetParent()

dpNode* dpNode::GetParent ( int  id)
inline

Definition at line 69 of file dp.h.

◆ ID()

int dpNode::ID ( )
inline

Definition at line 93 of file dp.h.

◆ is_goal()

virtual int dpNode::is_goal ( )
protectedpure virtual

Check if the state is goal.

Implemented in LCPNode, and dpScheduleNode.

◆ next_breadth()

dpNode* dpNode::next_breadth ( dpNode refnode)
inlineprotected

Definition at line 136 of file dp.h.

◆ next_depth()

dpNode* dpNode::next_depth ( dpNode first_child = 0)
inlineprotected

Definition at line 125 of file dp.h.

◆ open()

int dpNode::open ( int  _max_nodes,
int  _max_goals 
)
protected

Definition at line 92 of file dp.cpp.

◆ Parent()

dpNode* dpNode::Parent ( )
inline

Definition at line 52 of file dp.h.

◆ Queue()

dpQueue* dpNode::Queue ( )
inline

Definition at line 89 of file dp.h.

◆ remove()

void dpNode::remove ( )
protected

Definition at line 184 of file dp.cpp.

◆ remove_single()

void dpNode::remove_single ( )
protected

Definition at line 178 of file dp.cpp.

◆ same_state()

virtual int dpNode::same_state ( dpNode refnode)
protectedpure virtual

Check if the node's state is the same as refnode. (to remove duplicates)

Implemented in LCPNode, and dpScheduleNode.

◆ TotalAstarCost()

double dpNode::TotalAstarCost ( )
inline

Definition at line 82 of file dp.h.

◆ TotalCost()

double dpNode::TotalCost ( )
inline

Definition at line 76 of file dp.h.

Friends And Related Function Documentation

◆ dpMain

friend class dpMain
friend

Definition at line 32 of file dp.h.

◆ dpQueue

friend class dpQueue
friend

Definition at line 31 of file dp.h.

Member Data Documentation

◆ active

int dpNode::active
protected

Definition at line 169 of file dp.h.

◆ astar_cost

double dpNode::astar_cost
protected

Definition at line 157 of file dp.h.

◆ brother

dpNode* dpNode::brother
protected

Definition at line 161 of file dp.h.

◆ child

dpNode* dpNode::child
protected

Definition at line 162 of file dp.h.

◆ cost

double dpNode::cost
protected

Definition at line 156 of file dp.h.

◆ depth

int dpNode::depth
protected

Definition at line 168 of file dp.h.

◆ dp_main

dpMain* dpNode::dp_main
protected

Definition at line 165 of file dp.h.

◆ id

int dpNode::id
protected

Definition at line 167 of file dp.h.

◆ parent

dpNode* dpNode::parent
protected

Definition at line 160 of file dp.h.

◆ queue

dpQueue* dpNode::queue
protected

Definition at line 166 of file dp.h.

◆ total_astar_cost

double dpNode::total_astar_cost
protected

Definition at line 164 of file dp.h.

◆ total_cost

double dpNode::total_cost
protected

Definition at line 163 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