Assignment Search Framework
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
BFSNode< state_t, action_t > Class Template Reference

Public Member Functions

 BFSNode (const state_t &node_state, NodeID parent, const action_t &action, double g, double h, double node_eval, BFSOpenLocation loc)
 
 ~BFSNode ()
 

Public Attributes

state_t state
 The state corresponding to this node. More...
 
NodeID parent_id
 The id of the parent of this node. More...
 
action_t gen_action
 A action used to generate this node. More...
 
double g_cost
 The g-cost of the node. More...
 
double h_value
 The heuristic value of the node. More...
 
double eval
 The evaluation of the node. More...
 
BFSOpenLocation location
 The location of the node in the open list heap. Means nothing if in_open is false. More...
 
bool in_open
 If the node is in the open list or not. More...
 
bool reopened
 If the node has been reopened. More...
 

Detailed Description

template<class state_t, class action_t>
class BFSNode< state_t, action_t >

A class for a Best First Search node.

Constructor & Destructor Documentation

template<class state_t , class action_t >
BFSNode< state_t, action_t >::BFSNode ( const state_t &  node_state,
NodeID  parent,
const action_t &  action,
double  g,
double  h,
double  node_eval,
BFSOpenLocation  loc 
)

A constructor for a BFSNode that sets the node attributes.

The created node is assumed to be immediately put in the open list, and has not be reopened.

Todo:
Make this more generic.
Parameters
node_stateThe state corresponding to the node.
parentThe id of the parent of this node. Should be set to 0 if it has no parent.
actionThe action that generated this node from the corresponding parent.
gThe g-cost of this node.
hThe heuristic value of this node.
node_evalThe evaluation of this node.
locThe location of this node in the open list.
template<class state_t , class action_t >
BFSNode< state_t, action_t >::~BFSNode ( )

Destructor for a best-first search node. Does nothing.

Member Data Documentation

template<class state_t, class action_t>
double BFSNode< state_t, action_t >::eval

The evaluation of the node.

template<class state_t, class action_t>
double BFSNode< state_t, action_t >::g_cost

The g-cost of the node.

template<class state_t, class action_t>
action_t BFSNode< state_t, action_t >::gen_action

A action used to generate this node.

template<class state_t, class action_t>
double BFSNode< state_t, action_t >::h_value

The heuristic value of the node.

template<class state_t, class action_t>
bool BFSNode< state_t, action_t >::in_open

If the node is in the open list or not.

template<class state_t, class action_t>
BFSOpenLocation BFSNode< state_t, action_t >::location

The location of the node in the open list heap. Means nothing if in_open is false.

template<class state_t, class action_t>
NodeID BFSNode< state_t, action_t >::parent_id

The id of the parent of this node.

template<class state_t, class action_t>
bool BFSNode< state_t, action_t >::reopened

If the node has been reopened.

template<class state_t, class action_t>
state_t BFSNode< state_t, action_t >::state

The state corresponding to this node.


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