MultiAgentDecisionProcess
QTable Class Reference

QTable implements QTableInterface using a full matrix. More...

#include <QTable.h>

Inheritance diagram for QTable:
[legend]

Public Member Functions

virtual QTableClone () const
 Returns a pointer to a copy of this class. More...
 
virtual double Get (Index s_i, Index ja_i) const
 
size_t GetNrActions () const
 
size_t GetNrStates () const
 
row_t GetRow (Index s_i) const
 
 QTable ()
 (default) Constructor More...
 
 QTable (size_t S, size_t A)
 
 QTable (size_t S, size_t A, double init)
 
 QTable (const QTable &a)
 Copy constructor. More...
 
virtual void Set (Index s_i, Index ja_i, double rew)
 
virtual void SetToZero ()
 
- Public Member Functions inherited from QTableInterface
virtual ~QTableInterface ()
 

Static Public Member Functions

static void Load (const std::string &filename, size_t nrRows, size_t nrColumns, QTable &Q)
 Load a QTable from disk, resulting QTable is stored in Q argument. More...
 
static void Load (const std::string &filename, size_t nrRows, size_t nrColumns, size_t nrTables, QTables &Qs)
 Loads QTables from disk, resulting QTables is stored in Qs argument. More...
 
static void Save (const QTable &Q, const std::string &filename)
 Save QTable Q to disk. More...
 
static void Save (const QTables &Qs, const std::string &filename)
 Save QTables Qs to disk. More...
 

Detailed Description

QTable implements QTableInterface using a full matrix.

Constructor & Destructor Documentation

QTable::QTable ( )
inline

(default) Constructor

Referenced by Clone().

QTable::QTable ( size_t  S,
size_t  A 
)
inline
QTable::QTable ( size_t  S,
size_t  A,
double  init 
)
inline
QTable::QTable ( const QTable a)
inline

Copy constructor.

Member Function Documentation

virtual QTable* QTable::Clone ( ) const
inlinevirtual

Returns a pointer to a copy of this class.

Implements QTableInterface.

References QTable().

virtual double QTable::Get ( Index  s_i,
Index  ja_i 
) const
inlinevirtual

Implements QTableInterface.

size_t QTable::GetNrActions ( ) const
inline
size_t QTable::GetNrStates ( ) const
inline
row_t QTable::GetRow ( Index  s_i) const
inline
void QTable::Load ( const std::string &  filename,
size_t  nrRows,
size_t  nrColumns,
QTable Q 
)
static
void QTable::Load ( const std::string &  filename,
size_t  nrRows,
size_t  nrColumns,
size_t  nrTables,
QTables Qs 
)
static

Loads QTables from disk, resulting QTables is stored in Qs argument.

void QTable::Save ( const QTable Q,
const std::string &  filename 
)
static
void QTable::Save ( const QTables Qs,
const std::string &  filename 
)
static

Save QTables Qs to disk.

virtual void QTable::Set ( Index  s_i,
Index  ja_i,
double  rew 
)
inlinevirtual

Implements QTableInterface.

void QTable::SetToZero ( )
virtual

Referenced by QHybrid::Initialize().