Public Member Functions | Protected Attributes | List of all members
tuw::StateVector Class Reference

Implementation of State for a dynamic size vector of double values. More...

#include <state_vector.hpp>

Inheritance diagram for tuw::StateVector:
Inheritance graph
[legend]

Public Member Functions

virtual StateSPtr cloneState () const override
 Clone-to-base-class-ptr function. More...
 
StateVectoroperator= (const StateVector &)=default
 
StateVectoroperator= (StateVector &&)=default
 
virtual void resize (const std::size_t &_i) override
 
 StateVector (State *_parent)
 
 StateVector ()
 
 StateVector (const StateVector &)=default
 
 StateVector (StateVector &&)=default
 
virtual double & value (const std::size_t &_i) override
 Access state variable based on index _i. More...
 
virtual const double & value (const std::size_t &_i) const override
 Const access state variable based on index _i. More...
 
virtual size_t valueSize () const override
 Size of the state variables. More...
 
std::vector< double > & valuesVector ()
 Reference to the state variables array. More...
 
const std::vector< double > & valuesVector () const
 Const reference to the variables array. More...
 
virtual ~StateVector ()=default
 
- Public Member Functions inherited from tuw::State
void fromEIGENVec (const Eigen::VectorXd &_vec)
 Copies all values from an Eigen vector. The valueSize of the State object has to be equal with the Eigen vector size. More...
 
void fromSTLVec (const std::vector< double > &_vec)
 Copies all values from an STL vector. The valueSize of the State object has to be equal with the STL vector size. More...
 
Stateoperator= (const State &)=default
 
Stateoperator= (State &&)=default
 
virtual void resize (const size_t &_i)
 Resizes the array. More...
 
 State (State *_parent)
 
 State ()
 
 State (const State &)=default
 
 State (State &&)=default
 
virtual StateSPtrstate (const std::size_t &_i)
 Access sub-state based on index _i. More...
 
virtual size_t stateSize () const
 Size of the sub-states. More...
 
void toEIGENVec (Eigen::VectorXd &_vec)
 Converts all the array values to an Eigen vector. More...
 
void toSTLVec (std::vector< double > &_vec)
 Converts all the array values to an STL vector. More...
 
virtual void updateSize ()
 Performs internal manipulation when any of the underlying arrays are being resized. More...
 
virtual ~State ()=default
 

Protected Attributes

std::vector< double > values_
 State array container. More...
 
- Protected Attributes inherited from tuw::State
Stateparent_
 Pointer to the parent State structure. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from tuw::State
static std::vector< double > & minus (State &_lhs, State &_rhs, std::vector< double > &_ans)
 Performs substraction. Left and right operand are required to have the same valueSize. More...
 
static Eigen::VectorXd & minus (State &_lhs, State &_rhs, Eigen::VectorXd &_ans)
 Performs substraction. Left and right operand are required to have the same valueSize. More...
 
static Stateminus (State &_lhs, State &_rhs, State &_ans)
 Performs substraction. Answer variable, left operand and right operand are required to have the same valueSize. More...
 
static std::vector< double > & plus (State &_lhs, State &_rhs, std::vector< double > &_ans)
 Performs addition. Left and right operand are required to have the same valueSize. More...
 
static Eigen::VectorXd & plus (State &_lhs, State &_rhs, Eigen::VectorXd &_ans)
 Performs addition. Left and right operand are required to have the same valueSize. More...
 
static Stateplus (State &_lhs, State &_rhs, State &_ans)
 Performs addition. Answer variable, left operand and right operand are required to have the same valueSize. More...
 
- Protected Member Functions inherited from tuw::State
void callRootUpdateSize ()
 Calls (if present) the parent updateSize procedure. Otherwise performs root updateSize. More...
 

Detailed Description

Implementation of State for a dynamic size vector of double values.

Definition at line 54 of file state_vector.hpp.

Constructor & Destructor Documentation

tuw::StateVector::StateVector ( State _parent)
inline

Definition at line 58 of file state_vector.hpp.

tuw::StateVector::StateVector ( )
inline

Definition at line 64 of file state_vector.hpp.

virtual tuw::StateVector::~StateVector ( )
virtualdefault
tuw::StateVector::StateVector ( const StateVector )
default
tuw::StateVector::StateVector ( StateVector &&  )
default

Member Function Documentation

virtual StateSPtr tuw::StateVector::cloneState ( ) const
inlineoverridevirtual

Clone-to-base-class-ptr function.

Implements tuw::State.

Definition at line 86 of file state_vector.hpp.

StateVector& tuw::StateVector::operator= ( const StateVector )
default
StateVector& tuw::StateVector::operator= ( StateVector &&  )
default
virtual void tuw::StateVector::resize ( const std::size_t &  _i)
inlineoverridevirtual

Definition at line 110 of file state_vector.hpp.

virtual double& tuw::StateVector::value ( const std::size_t &  _i)
inlineoverridevirtual

Access state variable based on index _i.

Implements tuw::State.

Definition at line 92 of file state_vector.hpp.

virtual const double& tuw::StateVector::value ( const std::size_t &  _i) const
inlineoverridevirtual

Const access state variable based on index _i.

Implements tuw::State.

Definition at line 98 of file state_vector.hpp.

virtual size_t tuw::StateVector::valueSize ( ) const
inlineoverridevirtual

Size of the state variables.

Implements tuw::State.

Definition at line 104 of file state_vector.hpp.

std::vector<double>& tuw::StateVector::valuesVector ( )
inline

Reference to the state variables array.

Definition at line 117 of file state_vector.hpp.

const std::vector<double>& tuw::StateVector::valuesVector ( ) const
inline

Const reference to the variables array.

Definition at line 123 of file state_vector.hpp.

Member Data Documentation

std::vector<double> tuw::StateVector::values_
protected

State array container.

Definition at line 129 of file state_vector.hpp.


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


tuw_control
Author(s): George Todoran
autogenerated on Mon Jun 10 2019 15:27:23