Public Member Functions | Public Attributes

claw::ai::game::action_eval< Action, Numeric > Class Template Reference

A score associated with an action. More...

#include <game_ai.hpp>

List of all members.

Public Member Functions

 action_eval (const Action &a, const Numeric &e)
 Constructor.
bool operator< (const action_eval &ae) const
 Compare with an otreh action.

Public Attributes

Action action
 The action.
Numeric eval
 The score of the action.

Detailed Description

template<typename Action, typename Numeric>
class claw::ai::game::action_eval< Action, Numeric >

A score associated with an action.

Template parameters:

Definition at line 110 of file game_ai.hpp.


Constructor & Destructor Documentation

template<typename Action , typename Numeric >
claw::ai::game::action_eval< Action, Numeric >::action_eval ( const Action &  a,
const Numeric &  e 
)

Constructor.

Parameters:
aThe evaluated action.
eThe evaluation of the action.

Definition at line 99 of file game_ai.tpp.

  : action(a), eval(e)
{

} // action_eval::action_eval()

Member Function Documentation

template<typename Action , typename Numeric >
bool claw::ai::game::action_eval< Action, Numeric >::operator< ( const action_eval< Action, Numeric > &  ae ) const

Compare with an otreh action.

Parameters:
aeThe other action.

Definition at line 112 of file game_ai.tpp.

References claw::ai::game::action_eval< Action, Numeric >::eval.

{
  return eval <  ae.eval; 
} // action_eval::operator<()

Member Data Documentation

template<typename Action, typename Numeric>
Action claw::ai::game::action_eval< Action, Numeric >::action

The action.

Definition at line 120 of file game_ai.hpp.

template<typename Action, typename Numeric>
Numeric claw::ai::game::action_eval< Action, Numeric >::eval

The score of the action.

Definition at line 123 of file game_ai.hpp.

Referenced by claw::ai::game::action_eval< Action, Numeric >::operator<().


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