Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members

Implements the tree-projection operator within the family of SymbolicOperators. More...

#include <tree_projection.hpp>

Inheritance diagram for TreeProjection:
Inheritance graph
[legend]

Public Member Functions

returnValue clearStaticCounters ()
 
virtual TreeProjectionclone () const
 
virtual TreeProjectioncloneTreeProjection () const
 
OperatorgetArgument () const
 
virtual returnValue initDerivative ()
 
virtual BooleanType isDependingOn (int dim, VariableType *varType, int *component, BooleanType *implicit_dep)
 
virtual BooleanType isLinearIn (int dim, VariableType *varType, int *component, BooleanType *implicit_dep)
 
virtual NeutralElement isOneOrZero () const
 
virtual BooleanType isPolynomialIn (int dim, VariableType *varType, int *component, BooleanType *implicit_dep)
 
virtual BooleanType isRationalIn (int dim, VariableType *varType, int *component, BooleanType *implicit_dep)
 
virtual BooleanType isTrivial () const
 
virtual returnValue loadIndices (SymbolicIndexList *indexList)
 
Operatoroperator= (const Operator &arg)
 
virtual Operatoroperator= (const Expression &arg)
 
virtual Operatoroperator= (const double &arg)
 
virtual OperatorpassArgument () const
 
 TreeProjection ()
 
 TreeProjection (const std::string &name_)
 
 TreeProjection (const TreeProjection &arg)
 
virtual ~TreeProjection ()
 
- Public Member Functions inherited from Projection
virtual returnValue AD_backward (int dim, VariableType *varType, int *component, Operator *seed, Operator **df, int &nNewIS, TreeProjection ***newIS)
 
virtual returnValue AD_backward (int number, double seed, double *df)
 
virtual returnValue AD_backward2 (int number, double seed1, double seed2, double *df, double *ddf)
 
virtual OperatorAD_forward (int dim, VariableType *varType, int *component, Operator **seed, int &nNewIS, TreeProjection ***newIS)
 
virtual returnValue AD_forward (int number, double *seed, double *df)
 
virtual returnValue AD_forward (int number, double *x, double *seed, double *f, double *df)
 
virtual returnValue AD_forward2 (int number, double *seed1, double *seed2, double *df, double *ddf)
 
virtual returnValue AD_symmetric (int dim, VariableType *varType, int *component, Operator *l, Operator **S, int dimS, Operator **dfS, Operator **ldf, Operator **H, int &nNewLIS, TreeProjection ***newLIS, int &nNewSIS, TreeProjection ***newSIS, int &nNewHIS, TreeProjection ***newHIS)
 
virtual returnValue clearBuffer ()
 
virtual Operatordifferentiate (int index)
 
virtual returnValue enumerateVariables (SymbolicIndexList *indexList)
 
virtual returnValue evaluate (int number, double *x, double *result)
 
virtual returnValue evaluate (EvaluationBase *x)
 
virtual CurvatureType getCurvature ()
 
virtual int getGlobalIndex () const
 
virtual MonotonicityType getMonotonicity ()
 
virtual OperatorName getName ()
 
virtual double getScale () const
 
VariableType getType () const
 
virtual int getVariableIndex () const
 
virtual BooleanType isDependingOn (VariableType var) const
 
virtual BooleanType isSymbolic () const
 
virtual BooleanType isVariable (VariableType &varType, int &component) const
 
virtual std::ostream & print (std::ostream &stream) const
 
 Projection ()
 
 Projection (const std::string &name_)
 
 Projection (VariableType variableType_, int vIndex_, const std::string &name_)
 
 Projection (const Projection &arg)
 
virtual returnValue setCurvature (CurvatureType curvature_)
 
virtual returnValue setMonotonicity (MonotonicityType monotonicity_)
 
virtual returnValue setScale (const double &scale_)
 
virtual Operatorsubstitute (int index, const Operator *sub)
 
virtual ~Projection ()
 
- Public Member Functions inherited from SmoothOperator
virtual double getValue () const
 
virtual BooleanType isSmooth () const
 
Expression operator* (const double &arg) const
 
Expression operator* (const DVector &arg) const
 
Expression operator* (const DMatrix &arg) const
 
Expression operator* (const Operator &arg) const
 
Expression operator* (const Expression &arg) const
 
Operatoroperator*= (const double &arg)
 
Operatoroperator*= (const DVector &arg)
 
Operatoroperator*= (const DMatrix &arg)
 
Operatoroperator*= (const Expression &arg)
 
Expression operator+ (const double &arg) const
 
Expression operator+ (const DVector &arg) const
 
Expression operator+ (const DMatrix &arg) const
 
Expression operator+ (const Operator &arg) const
 
Expression operator+ (const Expression &arg) const
 
Operatoroperator+= (const double &arg)
 
Operatoroperator+= (const DVector &arg)
 
Operatoroperator+= (const DMatrix &arg)
 
Operatoroperator+= (const Expression &arg)
 
Expression operator- (const double &arg) const
 
Expression operator- (const DVector &arg) const
 
Expression operator- (const DMatrix &arg) const
 
Expression operator- (const Operator &arg) const
 
Expression operator- (const Expression &arg) const
 
Expression operator- () const
 
Operatoroperator-= (const double &arg)
 
Operatoroperator-= (const DVector &arg)
 
Operatoroperator-= (const DMatrix &arg)
 
Operatoroperator-= (const Expression &arg)
 
Expression operator/ (const double &arg) const
 
Expression operator/ (const Operator &arg) const
 
Expression operator/ (const Expression &arg) const
 
Operatoroperator/= (const double &arg)
 
Operatoroperator/= (const Expression &arg)
 
ConstraintComponent operator<= (const double &ub) const
 
ConstraintComponent operator<= (const DVector &ub) const
 
ConstraintComponent operator<= (const VariablesGrid &ub) const
 
virtual Operatoroperator= (const DVector &arg)
 
virtual Operatoroperator= (const DMatrix &arg)
 
ConstraintComponent operator== (const double &b) const
 
ConstraintComponent operator== (const DVector &b) const
 
ConstraintComponent operator== (const VariablesGrid &b) const
 
ConstraintComponent operator>= (const double &lb) const
 
ConstraintComponent operator>= (const DVector &lb) const
 
ConstraintComponent operator>= (const VariablesGrid &lb) const
 
 SmoothOperator ()
 
virtual ~SmoothOperator ()
 
- Public Member Functions inherited from Operator
virtual OperatormyAdd (Operator *a, Operator *b)
 
virtual OperatormyLogarithm (Operator *a)
 
virtual OperatormyPower (Operator *a, Operator *b)
 
virtual OperatormyPowerInt (Operator *a, int b)
 
virtual OperatormyProd (Operator *a, Operator *b)
 
virtual OperatormySubtract (Operator *a, Operator *b)
 
 Operator ()
 
Expression operator* (const double &arg) const
 
Expression operator* (const DVector &arg) const
 
Expression operator* (const DMatrix &arg) const
 
Expression operator* (const Operator &arg) const
 
Expression operator* (const Expression &arg) const
 
Operatoroperator*= (const double &arg)
 
Operatoroperator*= (const DVector &arg)
 
Operatoroperator*= (const DMatrix &arg)
 
Operatoroperator*= (const Expression &arg)
 
Expression operator+ (const double &arg) const
 
Expression operator+ (const DVector &arg) const
 
Expression operator+ (const DMatrix &arg) const
 
Expression operator+ (const Operator &arg) const
 
Expression operator+ (const Expression &arg) const
 
Operatoroperator+= (const double &arg)
 
Operatoroperator+= (const DVector &arg)
 
Operatoroperator+= (const DMatrix &arg)
 
Operatoroperator+= (const Expression &arg)
 
Expression operator- (const double &arg) const
 
Expression operator- (const DVector &arg) const
 
Expression operator- (const DMatrix &arg) const
 
Expression operator- (const Operator &arg) const
 
Expression operator- (const Expression &arg) const
 
Expression operator- () const
 
Operatoroperator-= (const double &arg)
 
Operatoroperator-= (const DVector &arg)
 
Operatoroperator-= (const DMatrix &arg)
 
Operatoroperator-= (const Expression &arg)
 
Expression operator/ (const double &arg) const
 
Expression operator/ (const Operator &arg) const
 
Expression operator/ (const Expression &arg) const
 
Operatoroperator/= (const double &arg)
 
Operatoroperator/= (const Expression &arg)
 
ConstraintComponent operator<= (const double &ub) const
 
ConstraintComponent operator<= (const DVector &ub) const
 
ConstraintComponent operator<= (const VariablesGrid &ub) const
 
ConstraintComponent operator== (const double &b) const
 
ConstraintComponent operator== (const DVector &b) const
 
ConstraintComponent operator== (const VariablesGrid &b) const
 
ConstraintComponent operator>= (const double &lb) const
 
ConstraintComponent operator>= (const DVector &lb) const
 
ConstraintComponent operator>= (const VariablesGrid &lb) const
 
virtual ~Operator ()
 

Protected Member Functions

virtual returnValue ADbackwardProtected (int dim, VariableType *varType, int *component, Operator *seed, Operator **df, int &nNewIS, TreeProjection ***newIS)
 
virtual OperatorADforwardProtected (int dim, VariableType *varType, int *component, Operator **seed, int &nNewIS, TreeProjection ***newIS)
 
virtual returnValue ADsymmetricProtected (int dim, VariableType *varType, int *component, Operator *l, Operator **S, int dimS, Operator **dfS, Operator **ldf, Operator **H, int &nNewLIS, TreeProjection ***newLIS, int &nNewSIS, TreeProjection ***newSIS, int &nNewHIS, TreeProjection ***newHIS)
 
virtual void copy (const Projection &arg)
 
virtual returnValue setVariableExportName (const VariableType &_type, const std::vector< std::string > &_name)
 
- Protected Member Functions inherited from Operator
returnValue ADsymCommon (Operator *a, TreeProjection &da, TreeProjection &dda, int dim, VariableType *varType, int *component, Operator *l, Operator **S, int dimS, Operator **dfS, Operator **ldf, Operator **H, int &nNewLIS, TreeProjection ***newLIS, int &nNewSIS, TreeProjection ***newSIS, int &nNewHIS, TreeProjection ***newHIS)
 
returnValue ADsymCommon2 (Operator *a, Operator *b, TreeProjection &dx, TreeProjection &dy, TreeProjection &dxx, TreeProjection &dxy, TreeProjection &dyy, int dim, VariableType *varType, int *component, Operator *l, Operator **S, int dimS, Operator **dfS, Operator **ldf, Operator **H, int &nNewLIS, TreeProjection ***newLIS, int &nNewSIS, TreeProjection ***newSIS, int &nNewHIS, TreeProjection ***newHIS)
 
virtual TreeProjectionconvert2TreeProjection (Operator *a) const
 

Protected Attributes

Operatorargument
 
NeutralElement ne
 
- Protected Attributes inherited from Projection
CurvatureType curvature
 
MonotonicityType monotonicity
 
std::string name
 
OperatorName operatorName
 
double scale
 
int variableIndex
 
VariableType variableType
 
int vIndex
 
- Protected Attributes inherited from Operator
BooleanType initialized
 

Static Protected Attributes

static int count = 0
 

Additional Inherited Members

- Public Attributes inherited from SmoothOperator
int nCount
 
- Public Attributes inherited from Operator
int nCount
 

Detailed Description

Implements the tree-projection operator within the family of SymbolicOperators.

The class TreeProjection implements a tree projection within the family of SymbolicOperators.

Author
Boris Houska, Hans Joachim Ferreau

Definition at line 58 of file tree_projection.hpp.

Constructor & Destructor Documentation

TreeProjection::TreeProjection ( )

Default constructor

Definition at line 47 of file tree_projection.cpp.

TreeProjection::TreeProjection ( const std::string &  name_)

Default constructor

Definition at line 58 of file tree_projection.cpp.

TreeProjection::TreeProjection ( const TreeProjection arg)

Copy constructor (deep copy).

Definition at line 70 of file tree_projection.cpp.

TreeProjection::~TreeProjection ( )
virtual

Default destructor.

Definition at line 87 of file tree_projection.cpp.

Member Function Documentation

returnValue TreeProjection::ADbackwardProtected ( int  dim,
VariableType varType,
int *  component,
Operator seed,
Operator **  df,
int &  nNewIS,
TreeProjection ***  newIS 
)
protectedvirtual

Automatic Differentiation in backward mode on the symbolic
level. This function generates an expression for a
backward derivative

Returns
SUCCESSFUL_RETURN
Parameters
dimnumber of directions
varTypethe variable types
componentand their components
seedthe backward seed
dfthe result
nNewISthe number of new IS
newISthe new IS-pointer

Reimplemented from Projection.

Definition at line 267 of file tree_projection.cpp.

Operator * TreeProjection::ADforwardProtected ( int  dim,
VariableType varType,
int *  component,
Operator **  seed,
int &  nNewIS,
TreeProjection ***  newIS 
)
protectedvirtual

Automatic Differentiation in forward mode on the symbolic
level. This function generates an expression for a
forward derivative

Returns
SUCCESSFUL_RETURN
Parameters
dimdimension of the seed
varTypethe variable types
componentand their components
seedthe forward seed
nNewISthe number of new IS
newISthe new IS-pointer

Reimplemented from Projection.

Definition at line 215 of file tree_projection.cpp.

returnValue TreeProjection::ADsymmetricProtected ( int  dim,
VariableType varType,
int *  component,
Operator l,
Operator **  S,
int  dimS,
Operator **  dfS,
Operator **  ldf,
Operator **  H,
int &  nNewLIS,
TreeProjection ***  newLIS,
int &  nNewSIS,
TreeProjection ***  newSIS,
int &  nNewHIS,
TreeProjection ***  newHIS 
)
protectedvirtual

Automatic Differentiation in symmetric mode on the symbolic
level. This function generates an expression for a
second order derivative.

Returns
SUCCESSFUL_RETURN
Parameters
dimnumber of directions
varTypethe variable types
componentand their components
lthe backward seed
Sforward seed matrix
dimSdimension of forward seed
dfSfirst order foward result
ldffirst order backward result
Hupper trianglular part of the Hessian
nNewLISthe number of newLIS
newLISthe new LIS-pointer
nNewSISthe number of newSIS
newSISthe new SIS-pointer
nNewHISthe number of newHIS
newHISthe new HIS-pointer

Reimplemented from Projection.

Definition at line 335 of file tree_projection.cpp.

returnValue TreeProjection::clearStaticCounters ( )

This function clears all static counters. Although this
function is public it should never be used in C-code.
It is necessary for some Matlab-specific interfaces.
Please have a look into the header file
include/utils/matlab_acado_utils.hpp
for more details.

Definition at line 552 of file tree_projection.cpp.

TreeProjection * TreeProjection::clone ( ) const
virtual

Provides a deep copy of the expression.

Returns
a clone of the expression.

Reimplemented from Projection.

Definition at line 202 of file tree_projection.cpp.

TreeProjection * TreeProjection::cloneTreeProjection ( ) const
virtual

Provides a deep copy of a tree projection.

Returns
a clone of the TreeProjection.

Reimplemented from SmoothOperator.

Definition at line 208 of file tree_projection.cpp.

void TreeProjection::copy ( const Projection arg)
protectedvirtual

Copy function.

Reimplemented from Projection.

Definition at line 573 of file tree_projection.cpp.

Operator * TreeProjection::getArgument ( ) const

Get argument from intermediate state

Definition at line 559 of file tree_projection.cpp.

returnValue TreeProjection::initDerivative ( )
virtual

Reimplemented from Operator.

Definition at line 602 of file tree_projection.cpp.

BooleanType TreeProjection::isDependingOn ( int  dim,
VariableType varType,
int *  component,
BooleanType implicit_dep 
)
virtual

Checks whether the expression is depending on a variable

Returns
BT_FALSE if no dependence is detected
BT_TRUE otherwise
Parameters
dimnumber of directions
varTypethe variable types
componentand their components
implicit_depimplicit dependencies

Reimplemented from Projection.

Definition at line 504 of file tree_projection.cpp.

BooleanType TreeProjection::isLinearIn ( int  dim,
VariableType varType,
int *  component,
BooleanType implicit_dep 
)
virtual

Checks whether the expression is linear in
(or not depending on) a variable

Returns
BT_FALSE if no linearity is
detected
BT_TRUE otherwise
Parameters
dimnumber of directions
varTypethe variable types
componentand their components
implicit_depimplicit dependencies

Reimplemented from Projection.

Definition at line 516 of file tree_projection.cpp.

NeutralElement TreeProjection::isOneOrZero ( ) const
virtual

Checks whether the expression is zero or one

Returns
NE_ZERO
NE_ONE
NE_NEITHER_ONE_NOR_ZERO

Reimplemented from Projection.

Definition at line 566 of file tree_projection.cpp.

BooleanType TreeProjection::isPolynomialIn ( int  dim,
VariableType varType,
int *  component,
BooleanType implicit_dep 
)
virtual

Checks whether the expression is polynomial in
the specified variables

Returns
BT_FALSE if the expression is not polynomial
BT_TRUE otherwise
Parameters
dimnumber of directions
varTypethe variable types
componentand their components
implicit_depimplicit dependencies

Reimplemented from Projection.

Definition at line 528 of file tree_projection.cpp.

BooleanType TreeProjection::isRationalIn ( int  dim,
VariableType varType,
int *  component,
BooleanType implicit_dep 
)
virtual

Checks whether the expression is rational in
the specified variables

Returns
BT_FALSE if the expression is not rational
BT_TRUE otherwise
Parameters
dimnumber of directions
varTypethe variable types
componentand their components
implicit_depimplicit dependencies

Reimplemented from Projection.

Definition at line 540 of file tree_projection.cpp.

BooleanType TreeProjection::isTrivial ( ) const
virtual

Reimplemented from Projection.

Definition at line 596 of file tree_projection.cpp.

returnValue TreeProjection::loadIndices ( SymbolicIndexList indexList)
virtual

The function loadIndices passes an IndexList through
the whole expression tree. Whenever a variable gets the
IndexList it tries to make an entry. However if a
variable recognices that it has already been added
before it will not be allowed to make a second entry.
Note that all variables, in paticular the intermediate
states, will keep in mind whether they were allowed
to make an entry or not. This guarantees that
intermediate states are never evaluated twice if they
occur at several knots of the tree.

THIS FUNCTION IS FOR INTERNAL USE ONLY.

PLEASE CALL THIS FUNTION AT MOST ONES FOR AN EXPRESSION
AS A KIND OF INIT ROUTINE.

Returns
the name of the expression.
Parameters
indexListThe index list to be filled with entries

Reimplemented from Projection.

Definition at line 478 of file tree_projection.cpp.

Operator & TreeProjection::operator= ( const Operator arg)
virtual

Assignment Operator (deep copy).

Reimplemented from SmoothOperator.

Definition at line 103 of file tree_projection.cpp.

Operator & TreeProjection::operator= ( const Expression arg)
virtual

Sets the argument (note that arg should have dimension 1).

Reimplemented from SmoothOperator.

Definition at line 162 of file tree_projection.cpp.

Operator & TreeProjection::operator= ( const double &  arg)
virtual

Sets the argument (note that arg should have dimension 1).

Reimplemented from SmoothOperator.

Definition at line 193 of file tree_projection.cpp.

Operator * TreeProjection::passArgument ( ) const
virtual

Returns the argument or NULL if no intermediate argument available

Reimplemented from SmoothOperator.

Definition at line 579 of file tree_projection.cpp.

returnValue TreeProjection::setVariableExportName ( const VariableType _type,
const std::vector< std::string > &  _name 
)
protectedvirtual

Sets the name of the variable that is used for code export.

Returns
SUCCESSFUL_RETURN

Reimplemented from Projection.

Definition at line 585 of file tree_projection.cpp.

Member Data Documentation

Operator* TreeProjection::argument
protected

Definition at line 281 of file tree_projection.hpp.

BEGIN_NAMESPACE_ACADO int TreeProjection::count = 0
staticprotected

Definition at line 282 of file tree_projection.hpp.

NeutralElement TreeProjection::ne
protected

Definition at line 283 of file tree_projection.hpp.


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


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