Public Member Functions | Static Private Attributes | List of all members
ExpressionType< Derived, Type, AllowCounter > Class Template Reference

#include <expression.hpp>

Inheritance diagram for ExpressionType< Derived, Type, AllowCounter >:
Inheritance graph
[legend]

Public Member Functions

returnValue clearStaticCounters ()
 
virtual Expressionclone () const
 
 ExpressionType ()
 
 ExpressionType (const std::string &_name, unsigned _nRows, unsigned _nCols)
 
 ExpressionType (const Expression &_expression, unsigned _componentIdx=0)
 
 ExpressionType (const double &_arg)
 
 ExpressionType (const DVector &_arg)
 
 ExpressionType (const DMatrix &_arg)
 
 ExpressionType (const Operator &_arg)
 
virtual ~ExpressionType ()
 
- Public Member Functions inherited from Expression
Expression ADbackward (const Expression &arg) const
 
Expression ADbackward (const Expression &arg, const Expression &seed) const
 
Expression ADforward (const Expression &arg) const
 
Expression ADforward (const VariableType &varType_, const int *arg, int nV) const
 
Expression ADforward (const Expression &arg, const Expression &seed) const
 
Expression ADforward (const VariableType &varType_, const int *arg, const Expression &seed) const
 
Expression ADforward (const VariableType *varType_, const int *arg, const Expression &seed) const
 
Expression ADsymmetric (const Expression &arg, const Expression &S, const Expression &l, Expression *dfS=0, Expression *ldf=0) const
 
Expression ADsymmetric (const Expression &arg, const Expression &l, Expression *dfS=0, Expression *ldf=0) const
 
ExpressionappendCols (const Expression &arg)
 
ExpressionappendRows (const Expression &arg)
 
 Expression ()
 
 Expression (const Operator &tree_)
 
 Expression (const std::string &name_)
 
 Expression (const std::string &name_, uint nRows_, uint nCols_, VariableType variableType_=VT_UNKNOWN, uint globalTypeID=0)
 
 Expression (int nRows_, int nCols_=1, VariableType variableType_=VT_UNKNOWN, int globalTypeID=0)
 
 Expression (uint nRows_, uint nCols_=1, VariableType variableType_=VT_UNKNOWN, uint globalTypeID=0)
 
 Expression (const double &rhs)
 
 Expression (const DVector &rhs)
 
 Expression (const DMatrix &rhs)
 
 Expression (const Expression &rhs)
 
Expression getAcos () const
 
Expression getAsin () const
 
Expression getAtan () const
 
Expression getCol (const uint &colIdx) const
 
Expression getCols (const uint &colIdx1, const uint &colIdx2) const
 
uint getComponent (const unsigned int idx) const
 
Expression getCos () const
 
DMatrix getDependencyPattern (const Expression &arg) const
 
uint getDim () const
 
Expression getDot () const
 
Expression getEntropy () const
 
Expression getEuclideanNorm () const
 
Expression getExp () const
 
Expression getInverse () const
 
Expression getLn () const
 
Expression getLogSumExp () const
 
Expression getNext () const
 
uint getNumCols () const
 
uint getNumRows () const
 
Expression getODEexpansion (const int &order, const int *arg) const
 
OperatorgetOperatorClone (uint idx) const
 
Expression getPow (const Expression &arg) const
 
Expression getPowInt (const int &arg) const
 
Expression getRow (const uint &rowIdx) const
 
Expression getRows (const uint &rowIdx1, const uint &rowIdx2) const
 
Expression getSin () const
 
DMatrix getSparsityPattern () const
 
Expression getSqrt () const
 
Expression getSubMatrix (const uint &rowIdx1, const uint &rowIdx2, const uint &colIdx1, const uint &colIdx2) const
 
Expression getSumSquare () const
 
Expression getTan () const
 
VariableType getVariableType () const
 
BooleanType isDependingOn (VariableType type) const
 
BooleanType isDependingOn (const Expression &e) const
 
BooleanType isVariable () const
 
Expression operator() (uint idx) const
 
Expression operator() (uint rowIdx, uint colIdx) const
 
Operatoroperator() (uint idx)
 
Operatoroperator() (uint rowIdx, uint colIdx)
 
Expressionoperator*= (const Expression &arg)
 
Expressionoperator+= (const Expression &arg)
 
Expression operator- () const
 
Expressionoperator-= (const Expression &arg)
 
Expressionoperator/= (const Expression &arg)
 
Expressionoperator<< (const Expression &arg)
 
Expressionoperator= (const Expression &arg)
 
std::ostream & print (std::ostream &stream) const
 
returnValue substitute (int idx, const Expression &arg) const
 
Expression transpose () const
 
virtual ~Expression ()
 

Static Private Attributes

static unsigned count
 

Additional Inherited Members

- Protected Member Functions inherited from Expression
Expression add (const Expression &arg) const
 
ExpressionassignmentSetup (const Expression &arg)
 
void construct (VariableType variableType_, uint globalTypeID_, uint nRows_, uint nCols_, const std::string &name_)
 
void copy (const Expression &rhs)
 
void deleteAll ()
 
Expression div (const Expression &arg) const
 
Expression mul (const Expression &arg) const
 
Operatorproduct (const Operator *a, const Operator *b) const
 
Expression sub (const Expression &arg) const
 
- Protected Attributes inherited from Expression
uint component
 
uint dim
 
Operator ** element
 
std::string name
 
uint nCols
 
uint nRows
 
VariableType variableType
 

Detailed Description

template<class Derived, VariableType Type, bool AllowCounter = true>
class ExpressionType< Derived, Type, AllowCounter >

A helper class implementing the CRTP design pattern.

This class gives object counting and clone capability to a derived class via static polymorphism.

Template Parameters
DerivedThe derived class.
TypeThe expression type.
See also
VariableType
Template Parameters
AllowCounterAllow object instance counting.
Note
Unfortunately the derived classes have to implement all necessary ctors. In C++11, this can be done in a much simpler way. One only needs to say: using Base::Base.

Definition at line 340 of file expression.hpp.

Constructor & Destructor Documentation

template<class Derived, VariableType Type, bool AllowCounter = true>
ExpressionType< Derived, Type, AllowCounter >::ExpressionType ( )
inline

Default constructor.

Definition at line 345 of file expression.hpp.

template<class Derived, VariableType Type, bool AllowCounter = true>
ExpressionType< Derived, Type, AllowCounter >::ExpressionType ( const std::string &  _name,
unsigned  _nRows,
unsigned  _nCols 
)
inline

The constructor with arguments.

Definition at line 353 of file expression.hpp.

template<class Derived, VariableType Type, bool AllowCounter = true>
ExpressionType< Derived, Type, AllowCounter >::ExpressionType ( const Expression _expression,
unsigned  _componentIdx = 0 
)
inline

The constructor from an expression.

Definition at line 361 of file expression.hpp.

template<class Derived, VariableType Type, bool AllowCounter = true>
ExpressionType< Derived, Type, AllowCounter >::ExpressionType ( const double &  _arg)
inline

The constructor from a scalar number.

Definition at line 371 of file expression.hpp.

template<class Derived, VariableType Type, bool AllowCounter = true>
ExpressionType< Derived, Type, AllowCounter >::ExpressionType ( const DVector _arg)
inline

The constructor from a vector.

Definition at line 376 of file expression.hpp.

template<class Derived, VariableType Type, bool AllowCounter = true>
ExpressionType< Derived, Type, AllowCounter >::ExpressionType ( const DMatrix _arg)
inline

The constructor from a matrix.

Definition at line 381 of file expression.hpp.

template<class Derived, VariableType Type, bool AllowCounter = true>
ExpressionType< Derived, Type, AllowCounter >::ExpressionType ( const Operator _arg)
inline

The constructor from an operator.

Definition at line 386 of file expression.hpp.

template<class Derived, VariableType Type, bool AllowCounter = true>
virtual ExpressionType< Derived, Type, AllowCounter >::~ExpressionType ( )
inlinevirtual

Destructor.

Definition at line 391 of file expression.hpp.

Member Function Documentation

template<class Derived, VariableType Type, bool AllowCounter = true>
returnValue ExpressionType< Derived, Type, AllowCounter >::clearStaticCounters ( )
inline

A function for resetting of the istance counter.

Definition at line 398 of file expression.hpp.

template<class Derived, VariableType Type, bool AllowCounter = true>
virtual Expression* ExpressionType< Derived, Type, AllowCounter >::clone ( ) const
inlinevirtual

Function for cloning.

Reimplemented from Expression.

Definition at line 394 of file expression.hpp.

Member Data Documentation

template<class Derived, VariableType Type, bool AllowCounter = true>
unsigned ExpressionType< Derived, Type, AllowCounter >::count
staticprivate

Definition at line 402 of file expression.hpp.


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


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:35:24