CMlib
Cell mapping algorithms in C++
cm::UniformCellStateSpace< CellType, IDType, StateVectorType > Class Template Reference

#include <css.h>

Inheritance diagram for cm::UniformCellStateSpace< CellType, IDType, StateVectorType >:
cm::CellStateSpaceBase< CellType, IDType, StateVectorType > cm::SCMUniformCellStateSpace< CellType, IDType, StateVectorType >

Public Member Functions

 UniformCellStateSpace (StateVectorType center, StateVectorType width, const std::vector< IDType > &cellCounts)
 The width of all cells. More...
 
const StateVectorType & getWidth () const
 
const StateVectorType & getCenter () const
 
IDType getIDFromCellCoord (std::vector< IDType > cellCoord)
 
IDType getID (const StateVectorType &state) const
 
CellType & getCellAtState (const StateVectorType &state)
 Returns the cell corresponding to a point in the state space. More...
 
const CellType & getCellAtState (const StateVectorType &state) const
 Returns the cell corresponding to a point in the state space (const) More...
 
CellType & getCell (const IDType ID)
 Returns the cell with the given ID. More...
 
const CellType & getCell (const IDType ID) const
 Returns the cell with the given ID (const) More...
 
const StateVectorType getCenter (const IDType ID) const
 
IDType getCellSum () const
 
const std::vector< IDType > & getCellCounts () const
 

Protected Attributes

std::vector< CellType > cells
 
StateVectorType center
 Directly accessible container for cell objects. More...
 
StateVectorType width
 The center of the state space. More...
 
std::vector< IDType > cellCounts
 The width of the state space. More...
 
std::vector< IDType > cellBase
 Number of cells along each dimension. More...
 
IDType cellSum
 Base for addressing the 1D array for multi dimensional cases. More...
 
IDType dimension
 The total number of cells within the state space. More...
 
StateVectorType cellWidth
 The dimension of the state space. More...
 

Constructor & Destructor Documentation

◆ UniformCellStateSpace()

template<class CellType , class IDType , class StateVectorType >
cm::UniformCellStateSpace< CellType, IDType, StateVectorType >::UniformCellStateSpace ( StateVectorType  center,
StateVectorType  width,
const std::vector< IDType > &  cellCounts 
)
inline

The width of all cells.

Member Function Documentation

◆ getCell() [1/2]

template<class CellType , class IDType , class StateVectorType >
CellType& cm::UniformCellStateSpace< CellType, IDType, StateVectorType >::getCell ( const IDType  id)
inlinevirtual

Returns the cell with the given ID.

Implements cm::CellStateSpaceBase< CellType, IDType, StateVectorType >.

◆ getCell() [2/2]

template<class CellType , class IDType , class StateVectorType >
const CellType& cm::UniformCellStateSpace< CellType, IDType, StateVectorType >::getCell ( const IDType  id) const
inlinevirtual

Returns the cell with the given ID (const)

Implements cm::CellStateSpaceBase< CellType, IDType, StateVectorType >.

◆ getCellAtState() [1/2]

template<class CellType , class IDType , class StateVectorType >
CellType& cm::UniformCellStateSpace< CellType, IDType, StateVectorType >::getCellAtState ( const StateVectorType &  state)
inlinevirtual

Returns the cell corresponding to a point in the state space.

Implements cm::CellStateSpaceBase< CellType, IDType, StateVectorType >.

◆ getCellAtState() [2/2]

template<class CellType , class IDType , class StateVectorType >
const CellType& cm::UniformCellStateSpace< CellType, IDType, StateVectorType >::getCellAtState ( const StateVectorType &  state) const
inlinevirtual

Returns the cell corresponding to a point in the state space (const)

Implements cm::CellStateSpaceBase< CellType, IDType, StateVectorType >.

◆ getCellCounts()

template<class CellType , class IDType , class StateVectorType >
const std::vector<IDType>& cm::UniformCellStateSpace< CellType, IDType, StateVectorType >::getCellCounts ( ) const
inline

◆ getCellSum()

template<class CellType , class IDType , class StateVectorType >
IDType cm::UniformCellStateSpace< CellType, IDType, StateVectorType >::getCellSum ( ) const
inline

◆ getCenter() [1/2]

template<class CellType , class IDType , class StateVectorType >
const StateVectorType& cm::UniformCellStateSpace< CellType, IDType, StateVectorType >::getCenter ( ) const
inlinevirtual

◆ getCenter() [2/2]

template<class CellType , class IDType , class StateVectorType >
const StateVectorType cm::UniformCellStateSpace< CellType, IDType, StateVectorType >::getCenter ( const IDType  ID) const
inline

◆ getID()

template<class CellType , class IDType , class StateVectorType >
IDType cm::UniformCellStateSpace< CellType, IDType, StateVectorType >::getID ( const StateVectorType &  state) const
inline

◆ getIDFromCellCoord()

template<class CellType , class IDType , class StateVectorType >
IDType cm::UniformCellStateSpace< CellType, IDType, StateVectorType >::getIDFromCellCoord ( std::vector< IDType >  cellCoord)
inline

◆ getWidth()

template<class CellType , class IDType , class StateVectorType >
const StateVectorType& cm::UniformCellStateSpace< CellType, IDType, StateVectorType >::getWidth ( ) const
inlinevirtual

Member Data Documentation

◆ cellBase

template<class CellType , class IDType , class StateVectorType >
std::vector<IDType> cm::UniformCellStateSpace< CellType, IDType, StateVectorType >::cellBase
protected

Number of cells along each dimension.

◆ cellCounts

template<class CellType , class IDType , class StateVectorType >
std::vector<IDType> cm::UniformCellStateSpace< CellType, IDType, StateVectorType >::cellCounts
protected

The width of the state space.

◆ cells

template<class CellType , class IDType , class StateVectorType >
std::vector<CellType> cm::UniformCellStateSpace< CellType, IDType, StateVectorType >::cells
protected

◆ cellSum

template<class CellType , class IDType , class StateVectorType >
IDType cm::UniformCellStateSpace< CellType, IDType, StateVectorType >::cellSum
protected

Base for addressing the 1D array for multi dimensional cases.

◆ cellWidth

template<class CellType , class IDType , class StateVectorType >
StateVectorType cm::UniformCellStateSpace< CellType, IDType, StateVectorType >::cellWidth
protected

The dimension of the state space.

◆ center

template<class CellType , class IDType , class StateVectorType >
StateVectorType cm::UniformCellStateSpace< CellType, IDType, StateVectorType >::center
protected

Directly accessible container for cell objects.

◆ dimension

template<class CellType , class IDType , class StateVectorType >
IDType cm::UniformCellStateSpace< CellType, IDType, StateVectorType >::dimension
protected

The total number of cells within the state space.

◆ width

template<class CellType , class IDType , class StateVectorType >
StateVectorType cm::UniformCellStateSpace< CellType, IDType, StateVectorType >::width
protected

The center of the state space.


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