HOG2
Public Member Functions | Private Attributes | List of all members
Unit< state, action, environment > Class Template Referenceabstract

#include <Unit.h>

Inheritance diagram for Unit< state, action, environment >:
Inheritance graph
[legend]

Public Member Functions

 Unit ()
 
virtual ~Unit ()
 
virtual const char * GetName ()=0
 
virtual bool MakeMove (environment *, OccupancyInterface< state, action > *, SimulationInfo< state, action, environment > *, action &a)=0
 
virtual void UpdateLocation (environment *, state &, bool success, SimulationInfo< state, action, environment > *)=0
 
virtual void GetLocation (state &)=0
 
virtual void OpenGLDraw (const environment *, const SimulationInfo< state, action, environment > *) const =0
 
virtual void GetGoal (state &s)
 
virtual bool Done ()
 
virtual double GetSpeed ()
 
void SetSpeed (double s)
 
virtual void LogStats (StatCollection *)
 log an stats that may have been computed during the last run More...
 
virtual void LogFinalStats (StatCollection *)
 log any final one-time stats before a simulation is ended More...
 
virtual void SetColor (GLfloat _r, GLfloat _g, GLfloat _b)
 
virtual void GetColor (GLfloat &_r, GLfloat &_g, GLfloat &_b) const
 
UnitGroup< state, action, environment > * GetUnitGroup ()
 
void SetUnitGroup (UnitGroup< state, action, environment > *_group)
 
virtual unsigned int GetNum ()
 
virtual void SetNum (unsigned int num)
 
virtual void StartNewTrial (StatCollection *)
 
virtual int GetPriority ()
 
virtual void SetPriority (int val)
 

Private Attributes

double speed
 
int priority
 
UnitGroup< state, action, environment > * group
 
GLfloat r
 
GLfloat g
 
GLfloat b
 
unsigned int unitid
 

Detailed Description

template<class state, class action, class environment>
class Unit< state, action, environment >

Definition at line 23 of file Unit.h.

Constructor & Destructor Documentation

◆ Unit()

template<class state , class action , class environment >
Unit< state, action, environment >::Unit ( )
inline

Definition at line 26 of file Unit.h.

◆ ~Unit()

template<class state , class action , class environment >
virtual Unit< state, action, environment >::~Unit ( )
inlinevirtual

Definition at line 27 of file Unit.h.

Member Function Documentation

◆ Done()

template<class state , class action , class environment >
virtual bool Unit< state, action, environment >::Done ( )
inlinevirtual

◆ GetColor()

template<class state , class action , class environment >
virtual void Unit< state, action, environment >::GetColor ( GLfloat &  _r,
GLfloat &  _g,
GLfloat &  _b 
) const
inlinevirtual

Definition at line 45 of file Unit.h.

◆ GetGoal()

template<class state , class action , class environment >
virtual void Unit< state, action, environment >::GetGoal ( state &  s)
inlinevirtual

◆ GetLocation()

template<class state , class action , class environment >
virtual void Unit< state, action, environment >::GetLocation ( state &  )
pure virtual

◆ GetName()

template<class state , class action , class environment >
virtual const char* Unit< state, action, environment >::GetName ( )
pure virtual

◆ GetNum()

template<class state , class action , class environment >
virtual unsigned int Unit< state, action, environment >::GetNum ( )
inlinevirtual

Definition at line 76 of file Unit.h.

◆ GetPriority()

template<class state , class action , class environment >
virtual int Unit< state, action, environment >::GetPriority ( )
inlinevirtual

Definition at line 80 of file Unit.h.

◆ GetSpeed()

template<class state , class action , class environment >
virtual double Unit< state, action, environment >::GetSpeed ( )
inlinevirtual

Definition at line 36 of file Unit.h.

◆ GetUnitGroup()

template<class state , class action , class environment >
UnitGroup<state, action, environment>* Unit< state, action, environment >::GetUnitGroup ( )
inline

Definition at line 47 of file Unit.h.

Referenced by UnitSimulation< state, action, environment >::StepUnitTime().

◆ LogFinalStats()

template<class state , class action , class environment >
virtual void Unit< state, action, environment >::LogFinalStats ( StatCollection )
inlinevirtual

log any final one-time stats before a simulation is ended

Reimplemented in GenericSearchUnit< state, action, environment >, SearchUnit, patrolUnit, GenericPatrolUnit< state, action, environment >, and LearningUnit< state, action, environment >.

Definition at line 42 of file Unit.h.

◆ LogStats()

template<class state , class action , class environment >
virtual void Unit< state, action, environment >::LogStats ( StatCollection )
inlinevirtual

log an stats that may have been computed during the last run

Reimplemented in GenericSearchUnit< state, action, environment >, SearchUnit, patrolUnit, and GenericPatrolUnit< state, action, environment >.

Definition at line 40 of file Unit.h.

Referenced by UnitSimulation< state, action, environment >::StepUnitTime().

◆ MakeMove()

template<class state , class action , class environment >
virtual bool Unit< state, action, environment >::MakeMove ( environment *  ,
OccupancyInterface< state, action > *  ,
SimulationInfo< state, action, environment > *  ,
action &  a 
)
pure virtual

◆ OpenGLDraw()

template<class state , class action , class environment >
virtual void Unit< state, action, environment >::OpenGLDraw ( const environment *  ,
const SimulationInfo< state, action, environment > *   
) const
pure virtual

◆ SetColor()

template<class state , class action , class environment >
virtual void Unit< state, action, environment >::SetColor ( GLfloat  _r,
GLfloat  _g,
GLfloat  _b 
)
inlinevirtual

◆ SetNum()

template<class state , class action , class environment >
virtual void Unit< state, action, environment >::SetNum ( unsigned int  num)
inlinevirtual

Definition at line 77 of file Unit.h.

◆ SetPriority()

template<class state , class action , class environment >
virtual void Unit< state, action, environment >::SetPriority ( int  val)
inlinevirtual

Definition at line 81 of file Unit.h.

◆ SetSpeed()

template<class state , class action , class environment >
void Unit< state, action, environment >::SetSpeed ( double  s)
inline

Definition at line 37 of file Unit.h.

◆ SetUnitGroup()

template<class state , class action , class environment >
void Unit< state, action, environment >::SetUnitGroup ( UnitGroup< state, action, environment > *  _group)
inline

◆ StartNewTrial()

template<class state , class action , class environment >
virtual void Unit< state, action, environment >::StartNewTrial ( StatCollection )
inlinevirtual

Reimplemented in LearningUnit< state, action, environment >.

Definition at line 78 of file Unit.h.

◆ UpdateLocation()

template<class state , class action , class environment >
virtual void Unit< state, action, environment >::UpdateLocation ( environment *  ,
state &  ,
bool  success,
SimulationInfo< state, action, environment > *   
)
pure virtual

Member Data Documentation

◆ b

template<class state , class action , class environment >
GLfloat Unit< state, action, environment >::b
private

◆ g

template<class state , class action , class environment >
GLfloat Unit< state, action, environment >::g
private

◆ group

template<class state , class action , class environment >
UnitGroup<state, action, environment>* Unit< state, action, environment >::group
private

◆ priority

template<class state , class action , class environment >
int Unit< state, action, environment >::priority
private

◆ r

template<class state , class action , class environment >
GLfloat Unit< state, action, environment >::r
private

◆ speed

template<class state , class action , class environment >
double Unit< state, action, environment >::speed
private

◆ unitid

template<class state , class action , class environment >
unsigned int Unit< state, action, environment >::unitid
private

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