Conscience Core
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
CscState Class Reference

#include <CscState.h>

Public Member Functions

 CscState (map< int, float > *pivotsValues=nullptr, map< int, float > *wheelsValues=nullptr, map< int, float > *propellersValues=nullptr, const optional< map< int, float >> &translationsValues={}, const vector< const CscMemberInputStatus * > *inputsValues=nullptr)
 
void setPivots (map< int, float > pivotsIn)
 
void setPropellers (map< int, float > propIn)
 
void setPropeller (int propId, float value)
 
void setPivot (int pivotId, float value)
 
void removePivot (int pivotId)
 
void setObjectiveValue (float value)
 
void setInputs (vector< const CscMemberInputStatus * > *inputsIn)
 
int countPivots () const
 
float getPivotValueByPivotId (int pivotId) const
 
int getPivotIdAt (int index)
 
int getWheelIdAt (int index)
 
int getTranslationIdAt (int index)
 
int getPropellerIdAt (int index)
 
float getWheelValueByWheelId (int wheelId) const
 
float getTranslationValueByTranslationId (int wheelId)
 
float getPropellerValueByPropellerId (int wheelId)
 
float getInputFromMemberName (string memberName, CscInputType inputId)
 
float getObjectiveValue () const
 
virtual ~CscState ()
 
int countPropellers () const
 
float getPropeller (int propId) const
 
string toString ()
 
string toUserFriendlyString (bool outputs=true, bool inputs=true) const
 
string toStringWithQuotes ()
 
vector< CscMemberInputStatus * > * getInputsCopy () const
 
const vector< const CscMemberInputStatus * > & getInputs () const
 
size_t countInputs () const
 
CscStategetDuplicata ()
 
map< int, float > getPropellersCopy () const
 
map< int, float > getPivotsCopy () const
 
map< int, float > getWheelsCopy () const
 
void clearInputs ()
 
float getWheel (int wheelId) const
 
const map< int, float > & getPropellers () const
 
const map< int, float > & getPivots () const
 
const map< int, float > & getWheels () const
 
const map< int, float > & getTranslations () const
 
int countWheels () const
 
void setWheel (int wheelId, float value)
 
void setWheels (map< int, float > wheelsIn)
 
void setTranslations (map< int, float > TranslationsIn)
 
int countTranslations () const
 
void setGridPosition (CscPoint3dOriented *gridPositionIn)
 
CscPoint3dOrientedgetGridPosition ()
 
float getTranslation (int translationId) const
 
map< int, float > getTranslationsCopy () const
 
map< CscInputType, float > getInputsFromMemberName (string memberName)
 
void setTranslation (int translationId, float value)
 
CscPoint3dgetPositionPivotFromPivotId (int pivotId, const CscEntityModel *entityModel)
 
virtual CscStateclone ()
 

Static Public Member Functions

static float getInputsDistance (const map< CscInputType, float > &inputsIn, const map< CscInputType, float > &inputsTargetValuesMember)
 

Public Attributes

int stateId = -1
 
int bestPathUnitMovment = -1
 

Constructor & Destructor Documentation

◆ CscState()

CscState::CscState ( map< int, float > *  pivotsValues = nullptr,
map< int, float > *  wheelsValues = nullptr,
map< int, float > *  propellersValues = nullptr,
const optional< map< int, float >> &  translationsValues = {},
const vector< const CscMemberInputStatus * > *  inputsValues = nullptr 
)

output values from -100 to 100

◆ ~CscState()

CscState::~CscState ( )
virtual

Member Function Documentation

◆ clearInputs()

void CscState::clearInputs ( )

◆ clone()

CscState * CscState::clone ( )
virtual

◆ countInputs()

size_t CscState::countInputs ( ) const
inline

◆ countPivots()

int CscState::countPivots ( ) const

◆ countPropellers()

int CscState::countPropellers ( ) const

◆ countTranslations()

int CscState::countTranslations ( ) const

◆ countWheels()

int CscState::countWheels ( ) const

◆ getDuplicata()

CscState * CscState::getDuplicata ( )

◆ getGridPosition()

CscPoint3dOriented * CscState::getGridPosition ( )

◆ getInputFromMemberName()

float CscState::getInputFromMemberName ( string  memberName,
CscInputType  inputId 
)

◆ getInputs()

const vector<const CscMemberInputStatus *>& CscState::getInputs ( ) const
inline

◆ getInputsCopy()

vector< CscMemberInputStatus * > * CscState::getInputsCopy ( ) const

◆ getInputsDistance()

float CscState::getInputsDistance ( const map< CscInputType, float > &  inputsIn,
const map< CscInputType, float > &  inputsTargetValuesMember 
)
static

◆ getInputsFromMemberName()

map< CscInputType, float > CscState::getInputsFromMemberName ( string  memberName)

◆ getObjectiveValue()

float CscState::getObjectiveValue ( ) const

◆ getPivotIdAt()

int CscState::getPivotIdAt ( int  index)

◆ getPivots()

const map< int, float > & CscState::getPivots ( ) const

◆ getPivotsCopy()

map< int, float > CscState::getPivotsCopy ( ) const

◆ getPivotValueByPivotId()

float CscState::getPivotValueByPivotId ( int  pivotId) const

◆ getPositionPivotFromPivotId()

CscPoint3d * CscState::getPositionPivotFromPivotId ( int  pivotId,
const CscEntityModel entityModel 
)

◆ getPropeller()

float CscState::getPropeller ( int  propId) const

◆ getPropellerIdAt()

int CscState::getPropellerIdAt ( int  index)

◆ getPropellers()

const map< int, float > & CscState::getPropellers ( ) const

◆ getPropellersCopy()

map< int, float > CscState::getPropellersCopy ( ) const

◆ getPropellerValueByPropellerId()

float CscState::getPropellerValueByPropellerId ( int  wheelId)

◆ getTranslation()

float CscState::getTranslation ( int  translationId) const

◆ getTranslationIdAt()

int CscState::getTranslationIdAt ( int  index)

◆ getTranslations()

const map< int, float > & CscState::getTranslations ( ) const

◆ getTranslationsCopy()

map< int, float > CscState::getTranslationsCopy ( ) const

◆ getTranslationValueByTranslationId()

float CscState::getTranslationValueByTranslationId ( int  wheelId)

◆ getWheel()

float CscState::getWheel ( int  wheelId) const

◆ getWheelIdAt()

int CscState::getWheelIdAt ( int  index)

◆ getWheels()

const map< int, float > & CscState::getWheels ( ) const

◆ getWheelsCopy()

map< int, float > CscState::getWheelsCopy ( ) const

◆ getWheelValueByWheelId()

float CscState::getWheelValueByWheelId ( int  wheelId) const

◆ removePivot()

void CscState::removePivot ( int  pivotId)

◆ setGridPosition()

void CscState::setGridPosition ( CscPoint3dOriented gridPositionIn)

◆ setInputs()

void CscState::setInputs ( vector< const CscMemberInputStatus * > *  inputsIn)

◆ setObjectiveValue()

void CscState::setObjectiveValue ( float  value)

◆ setPivot()

void CscState::setPivot ( int  pivotId,
float  value 
)

◆ setPivots()

void CscState::setPivots ( map< int, float >  pivotsIn)

◆ setPropeller()

void CscState::setPropeller ( int  propId,
float  value 
)

◆ setPropellers()

void CscState::setPropellers ( map< int, float >  propIn)

◆ setTranslation()

void CscState::setTranslation ( int  translationId,
float  value 
)

◆ setTranslations()

void CscState::setTranslations ( map< int, float >  TranslationsIn)

◆ setWheel()

void CscState::setWheel ( int  wheelId,
float  value 
)

◆ setWheels()

void CscState::setWheels ( map< int, float >  wheelsIn)

◆ toString()

string CscState::toString ( )

◆ toStringWithQuotes()

string CscState::toStringWithQuotes ( )

◆ toUserFriendlyString()

string CscState::toUserFriendlyString ( bool  outputs = true,
bool  inputs = true 
) const

Member Data Documentation

◆ bestPathUnitMovment

int CscState::bestPathUnitMovment = -1

◆ stateId

int CscState::stateId = -1

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