Implements the tree-projection operator within the family of SymbolicOperators. More...
#include <tree_projection.hpp>
Public Member Functions | |
returnValue | clearStaticCounters () |
virtual TreeProjection * | clone () const |
virtual TreeProjection * | cloneTreeProjection () const |
Operator * | getArgument () 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) |
Operator & | operator= (const Operator &arg) |
virtual Operator & | operator= (const Expression &arg) |
virtual Operator & | operator= (const double &arg) |
virtual Operator * | passArgument () const |
TreeProjection () | |
TreeProjection (const std::string &name_) | |
TreeProjection (const TreeProjection &arg) | |
virtual | ~TreeProjection () |
Protected Member Functions | |
virtual returnValue | ADbackwardProtected (int dim, VariableType *varType, int *component, Operator *seed, Operator **df, int &nNewIS, TreeProjection ***newIS) |
virtual Operator * | ADforwardProtected (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 Attributes | |
Operator * | argument |
NeutralElement | ne |
Static Protected Attributes | |
static int | count = 0 |
Implements the tree-projection operator within the family of SymbolicOperators.
The class TreeProjection implements a tree projection within the family of SymbolicOperators.
Definition at line 58 of file tree_projection.hpp.
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.
returnValue TreeProjection::ADbackwardProtected | ( | int | dim, |
VariableType * | varType, | ||
int * | component, | ||
Operator * | seed, | ||
Operator ** | df, | ||
int & | nNewIS, | ||
TreeProjection *** | newIS | ||
) | [protected, virtual] |
Automatic Differentiation in backward mode on the symbolic
level. This function generates an expression for a
backward derivative
dim | number of directions |
varType | the variable types |
component | and their components |
seed | the backward seed |
df | the result |
nNewIS | the number of new IS |
newIS | the 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 | ||
) | [protected, virtual] |
Automatic Differentiation in forward mode on the symbolic
level. This function generates an expression for a
forward derivative
dim | dimension of the seed |
varType | the variable types |
component | and their components |
seed | the forward seed |
nNewIS | the number of new IS |
newIS | the 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 | ||
) | [protected, virtual] |
Automatic Differentiation in symmetric mode on the symbolic
level. This function generates an expression for a
second order derivative.
dim | number of directions |
varType | the variable types |
component | and their components |
l | the backward seed |
S | forward seed matrix |
dimS | dimension of forward seed |
dfS | first order foward result |
ldf | first order backward result |
H | upper trianglular part of the Hessian |
nNewLIS | the number of newLIS |
newLIS | the new LIS-pointer |
nNewSIS | the number of newSIS |
newSIS | the new SIS-pointer |
nNewHIS | the number of newHIS |
newHIS | the new HIS-pointer |
Reimplemented from Projection.
Definition at line 335 of file tree_projection.cpp.
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.
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.
Reimplemented from SmoothOperator.
Definition at line 208 of file tree_projection.cpp.
void TreeProjection::copy | ( | const Projection & | arg | ) | [protected, virtual] |
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
dim | number of directions |
varType | the variable types |
component | and their components |
implicit_dep | implicit 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
dim | number of directions |
varType | the variable types |
component | and their components |
implicit_dep | implicit 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
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
dim | number of directions |
varType | the variable types |
component | and their components |
implicit_dep | implicit 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
dim | number of directions |
varType | the variable types |
component | and their components |
implicit_dep | implicit 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.
indexList | The index list to be filled with entries |
Reimplemented from Projection.
Definition at line 478 of file tree_projection.cpp.
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 | ||
) | [protected, virtual] |
Sets the name of the variable that is used for code export.
Reimplemented from Projection.
Definition at line 585 of file tree_projection.cpp.
Operator* TreeProjection::argument [protected] |
Definition at line 281 of file tree_projection.hpp.
BEGIN_NAMESPACE_ACADO int TreeProjection::count = 0 [static, protected] |
Definition at line 282 of file tree_projection.hpp.
NeutralElement TreeProjection::ne [protected] |
Definition at line 283 of file tree_projection.hpp.