Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Friends

Abstract base class for all scalar-valued symbolic operators. More...

#include <operator.hpp>

Inheritance diagram for Operator:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual returnValue AD_backward (int dim, VariableType *varType, int *component, Operator *seed, Operator **df, int &nNewIS, TreeProjection ***newIS)=0
virtual returnValue AD_backward (int number, double seed, double *df)=0
virtual returnValue AD_backward2 (int number, double seed1, double seed2, double *df, double *ddf)=0
virtual OperatorAD_forward (int dim, VariableType *varType, int *component, Operator **seed, int &nNewIS, TreeProjection ***newIS)=0
virtual returnValue AD_forward (int number, double *x, double *seed, double *f, double *df)=0
virtual returnValue AD_forward (int number, double *seed, double *df)=0
virtual returnValue AD_forward2 (int number, double *seed1, double *seed2, double *df, double *ddf)=0
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)=0
virtual returnValue clearBuffer ()=0
virtual Operatorclone () const =0
virtual TreeProjectioncloneTreeProjection () const
virtual Operatordifferentiate (int index)=0
virtual returnValue enumerateVariables (SymbolicIndexList *indexList)=0
virtual returnValue evaluate (int number, double *x, double *result)=0
virtual returnValue evaluate (EvaluationBase *x)=0
virtual CurvatureType getCurvature ()=0
virtual int getGlobalIndex () const
virtual MonotonicityType getMonotonicity ()=0
virtual OperatorName getName ()=0
virtual double getValue () const
virtual returnValue initDerivative ()
virtual BooleanType isDependingOn (VariableType var) const =0
virtual BooleanType isDependingOn (int dim, VariableType *varType, int *component, BooleanType *implicit_dep)=0
virtual BooleanType isLinearIn (int dim, VariableType *varType, int *component, BooleanType *implicit_dep)=0
virtual NeutralElement isOneOrZero () const =0
virtual BooleanType isPolynomialIn (int dim, VariableType *varType, int *component, BooleanType *implicit_dep)=0
virtual BooleanType isRationalIn (int dim, VariableType *varType, int *component, BooleanType *implicit_dep)=0
virtual BooleanType isSmooth () const =0
virtual BooleanType isSymbolic () const =0
virtual BooleanType isTrivial () const
virtual BooleanType isVariable (VariableType &varType, int &component) const =0
virtual returnValue loadIndices (SymbolicIndexList *indexList)=0
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
virtual Operatoroperator= (const double &arg)
virtual Operatoroperator= (const DVector &arg)
virtual Operatoroperator= (const DMatrix &arg)
virtual Operatoroperator= (const Expression &arg)
virtual Operatoroperator= (const Operator &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
virtual OperatorpassArgument () const
virtual std::ostream & print (std::ostream &stream) const =0
virtual returnValue setCurvature (CurvatureType curvature_)=0
virtual returnValue setMonotonicity (MonotonicityType monotonicity_)=0
virtual returnValue setVariableExportName (const VariableType &_type, const std::vector< std::string > &_name)
virtual Operatorsubstitute (int index, const Operator *sub)=0
virtual ~Operator ()

Public Attributes

int nCount

Protected Member Functions

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

BooleanType initialized

Friends

Expression operator* (const double &arg1, const Operator &arg2)
Expression operator* (const DVector &arg1, const Operator &arg2)
Expression operator* (const DMatrix &arg1, const Operator &arg2)
Expression operator+ (const double &arg1, const Operator &arg2)
Expression operator+ (const DVector &arg1, const Operator &arg2)
Expression operator+ (const DMatrix &arg1, const Operator &arg2)
Expression operator- (const double &arg1, const Operator &arg2)
Expression operator- (const DVector &arg1, const Operator &arg2)
Expression operator- (const DMatrix &arg1, const Operator &arg2)
Expression operator/ (const double &arg1, const Operator &arg2)
Expression operator/ (const DVector &arg1, const Operator &arg2)
Expression operator/ (const DMatrix &arg1, const Operator &arg2)
std::ostream & operator<< (std::ostream &stream, const Operator &arg)
ConstraintComponent operator<= (double lb, const Operator &arg)
ConstraintComponent operator<= (DVector lb, const Operator &arg)
ConstraintComponent operator<= (VariablesGrid lb, const Operator &arg)
ConstraintComponent operator== (double b, const Operator &arg)
ConstraintComponent operator== (DVector b, const Operator &arg)
ConstraintComponent operator== (VariablesGrid b, const Operator &arg)
ConstraintComponent operator>= (double ub, const Operator &arg)
ConstraintComponent operator>= (DVector ub, const Operator &arg)
ConstraintComponent operator>= (VariablesGrid ub, const Operator &arg)

Detailed Description

Abstract base class for all scalar-valued symbolic operators.

The class Operator serves as an abstract base class for all scalar-valued symbolic operators.

Author:
Boris Houska, Hans Joachim Ferreau

Definition at line 60 of file operator.hpp.


Constructor & Destructor Documentation

Default constructor.

Definition at line 47 of file operator.cpp.

Operator::~Operator ( ) [virtual]

Definition at line 53 of file operator.cpp.


Member Function Documentation

virtual returnValue Operator::AD_backward ( int  dim,
VariableType varType,
int *  component,
Operator seed,
Operator **  df,
int &  nNewIS,
TreeProjection ***  newIS 
) [pure virtual]

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

Implemented in NonsmoothOperator, SmoothOperator, COperator, Projection, Power, Power_Int, BinaryOperator, DoubleConstant, Product, Quotient, Subtraction, Addition, and UnaryOperator.

virtual returnValue Operator::AD_backward ( int  number,
double  seed,
double *  df 
) [pure virtual]

Automatic Differentiation in backward mode based on
buffered values

Returns:
SUCCESFUL_RETURN
RET_NAN
Parameters:
numberthe buffer position
seedthe seed
dfthe derivative of the expression

Implemented in NonsmoothOperator, SmoothOperator, Projection, COperator, BinaryOperator, DoubleConstant, Power_Int, UnaryOperator, Addition, Product, Subtraction, Power, and Quotient.

virtual returnValue Operator::AD_backward2 ( int  number,
double  seed1,
double  seed2,
double *  df,
double *  ddf 
) [pure virtual]

Automatic Differentiation in backward mode for 2nd order
derivatives based on buffered values.

Returns:
SUCCESFUL_RETURN
RET_NAN
Parameters:
numberthe buffer position
seed1the seed1
seed2the seed2
dfthe 1st derivative of the expression
ddfthe 2nd derivative of the expression

Implemented in NonsmoothOperator, SmoothOperator, Projection, COperator, BinaryOperator, DoubleConstant, Power_Int, UnaryOperator, Addition, Product, Subtraction, Power, and Quotient.

virtual Operator* Operator::AD_forward ( int  dim,
VariableType varType,
int *  component,
Operator **  seed,
int &  nNewIS,
TreeProjection ***  newIS 
) [pure virtual]

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

Implemented in NonsmoothOperator, SmoothOperator, COperator, Projection, Power, Power_Int, BinaryOperator, DoubleConstant, Product, Quotient, Subtraction, UnaryOperator, and Addition.

virtual returnValue Operator::AD_forward ( int  number,
double *  x,
double *  seed,
double *  f,
double *  df 
) [pure virtual]

Automatic Differentiation in forward mode.
This function stores the intermediate
results in a buffer (needed for 2nd order automatic
differentiation in backward mode)

Returns:
SUCCESFUL_RETURN
RET_NAN
Parameters:
numberstorage position
xThe evaluation point x
seedthe seed
fthe value of the expression at x
dfthe derivative of the expression

Implemented in NonsmoothOperator, SmoothOperator, COperator, Projection, DoubleConstant, Power_Int, BinaryOperator, UnaryOperator, Addition, Product, Subtraction, Power, and Quotient.

virtual returnValue Operator::AD_forward ( int  number,
double *  seed,
double *  df 
) [pure virtual]

Automatic Differentiation in forward mode.
This function uses the intermediate
results from a buffer

Returns:
SUCCESFUL_RETURN
RET_NAN
Parameters:
numberstorage position
seedthe seed
dfthe derivative of the expression

Implemented in NonsmoothOperator, SmoothOperator, BinaryOperator, COperator, Projection, DoubleConstant, Power_Int, UnaryOperator, Addition, Product, Subtraction, Power, and Quotient.

virtual returnValue Operator::AD_forward2 ( int  number,
double *  seed1,
double *  seed2,
double *  df,
double *  ddf 
) [pure virtual]

Automatic Differentiation in forward mode for
2nd derivatives.
This function uses intermediate
results from a buffer.

Returns:
SUCCESFUL_RETURN
RET_NAN
Parameters:
numberthe buffer position
seed1the seed
seed2the seed for the first derivative
dfthe derivative of the expression
ddfthe 2nd derivative of the expression

Implemented in NonsmoothOperator, SmoothOperator, Projection, COperator, BinaryOperator, DoubleConstant, Power_Int, UnaryOperator, Addition, Product, Subtraction, Power, and Quotient.

virtual returnValue Operator::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 
) [pure virtual]

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

Implemented in NonsmoothOperator, SmoothOperator, Projection, COperator, Power, Power_Int, BinaryOperator, DoubleConstant, Product, Subtraction, Addition, Quotient, and UnaryOperator.

returnValue Operator::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 
) [protected]
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

Definition at line 321 of file operator.cpp.

returnValue Operator::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 
) [protected]
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

Definition at line 387 of file operator.cpp.

virtual returnValue Operator::clearBuffer ( ) [pure virtual]

Clears the buffer and resets the buffer size
to 1.

Returns:
SUCCESFUL_RETURN

Implemented in NonsmoothOperator, SmoothOperator, Projection, COperator, DoubleConstant, Power_Int, BinaryOperator, and UnaryOperator.

virtual Operator* Operator::clone ( ) const [pure virtual]

Provides a deep copy of the expression.

Returns:
a clone of the expression.

Implemented in NonsmoothOperator, SmoothOperator, Projection, COperator, DoubleConstant, Power_Int, BinaryOperator, UnaryOperator, Addition, Product, Subtraction, Quotient, Power, Cos, Exp, Logarithm, Sin, Tan, Acos, Asin, Atan, and TreeProjection.

Provides a deep copy of a tree projection.

Returns:
a clone of the TreeProjection or
an assertion if the type this is
expression is no TreeProjection.

Reimplemented in NonsmoothOperator, SmoothOperator, and TreeProjection.

Definition at line 92 of file operator.cpp.

TreeProjection * Operator::convert2TreeProjection ( Operator a) const [protected, virtual]

Definition at line 312 of file operator.cpp.

virtual Operator* Operator::differentiate ( int  index) [pure virtual]

Returns the derivative of the expression with respect
to the variable var(index).

Returns:
The expression for the derivative.
Parameters:
indexdiff. index

Implemented in NonsmoothOperator, SmoothOperator, COperator, Projection, Power, Power_Int, BinaryOperator, DoubleConstant, Product, UnaryOperator, Quotient, Subtraction, and Addition.

virtual returnValue Operator::enumerateVariables ( SymbolicIndexList indexList) [pure virtual]

Enumerates all variables based on a common
IndexList.

Returns:
SUCCESFUL_RETURN

Implemented in NonsmoothOperator, SmoothOperator, Projection, COperator, BinaryOperator, DoubleConstant, Power_Int, and UnaryOperator.

virtual returnValue Operator::evaluate ( int  number,
double *  x,
double *  result 
) [pure virtual]

Evaluates the expression and stores the intermediate
results in a buffer (needed for automatic differentiation
in backward mode)

Returns:
SUCCESFUL_RETURN
RET_NAN
Parameters:
numberstorage position
xthe input variable x
resultthe result

Implemented in NonsmoothOperator, SmoothOperator, Projection, COperator, Power, BinaryOperator, DoubleConstant, Power_Int, Product, UnaryOperator, Quotient, Subtraction, and Addition.

virtual returnValue Operator::evaluate ( EvaluationBase x) [pure virtual]
virtual CurvatureType Operator::getCurvature ( ) [pure virtual]

Returns the curvature of the expression

Returns:
CT_CONSTANT
CT_AFFINE
CT_CONVEX
CT_CONCAVE

Implemented in NonsmoothOperator, SmoothOperator, COperator, Projection, DoubleConstant, BinaryOperator, Power_Int, UnaryOperator, Power, Addition, Product, Subtraction, Quotient, Exp, and Logarithm.

int Operator::getGlobalIndex ( ) const [virtual]

Asks the variable for its relative index.
Asks the variable for its global index.

Reimplemented in NonsmoothOperator, SmoothOperator, and Projection.

Definition at line 103 of file operator.cpp.

virtual MonotonicityType Operator::getMonotonicity ( ) [pure virtual]

Returns the monotonicity of the expression.

Returns:
MT_NONDECREASING
MT_NONINCREASING
MT_NONMONOTONIC

Implemented in NonsmoothOperator, SmoothOperator, COperator, Projection, DoubleConstant, BinaryOperator, Power_Int, UnaryOperator, Power, Addition, Product, Subtraction, and Quotient.

virtual OperatorName Operator::getName ( ) [pure virtual]

Asks the expression for its name.

Returns:
the name of the expression.

Implemented in NonsmoothOperator, SmoothOperator, COperator, Projection, BinaryOperator, DoubleConstant, Power_Int, UnaryOperator, Addition, Product, Subtraction, Quotient, and Power.

double Operator::getValue ( ) const [virtual]

Return the value of the constant

Reimplemented in NonsmoothOperator, SmoothOperator, DoubleConstant, Addition, Product, Subtraction, and Quotient.

Definition at line 211 of file operator.cpp.

Reimplemented in BinaryOperator, Power_Int, Quotient, Power, TreeProjection, Logarithm, Exp, Cos, Sin, Tan, Acos, Asin, and Atan.

Definition at line 519 of file operator.cpp.

virtual BooleanType Operator::isDependingOn ( VariableType  var) const [pure virtual]

Asks the expression whether it is depending on a certian type of
variable.

Returns:
BT_TRUE if a dependency is detected,
BT_FALSE otherwise.

Implemented in NonsmoothOperator, SmoothOperator, Projection, COperator, Power_Int, BinaryOperator, DoubleConstant, and UnaryOperator.

virtual BooleanType Operator::isDependingOn ( int  dim,
VariableType varType,
int *  component,
BooleanType implicit_dep 
) [pure 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

Implemented in NonsmoothOperator, SmoothOperator, Projection, COperator, BinaryOperator, DoubleConstant, Power_Int, UnaryOperator, and TreeProjection.

virtual BooleanType Operator::isLinearIn ( int  dim,
VariableType varType,
int *  component,
BooleanType implicit_dep 
) [pure 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

Implemented in NonsmoothOperator, SmoothOperator, Projection, COperator, BinaryOperator, DoubleConstant, Power_Int, UnaryOperator, Power, Product, Subtraction, Addition, Quotient, and TreeProjection.

virtual NeutralElement Operator::isOneOrZero ( ) const [pure virtual]

Checks whether the expression is zero or one

Returns:
NE_ZERO
NE_ONE
NE_NEITHER_ONE_NOR_ZERO

Implemented in NonsmoothOperator, SmoothOperator, TreeProjection, Projection, COperator, Power_Int, BinaryOperator, DoubleConstant, and UnaryOperator.

virtual BooleanType Operator::isPolynomialIn ( int  dim,
VariableType varType,
int *  component,
BooleanType implicit_dep 
) [pure 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

Implemented in NonsmoothOperator, SmoothOperator, Projection, COperator, BinaryOperator, DoubleConstant, Power_Int, UnaryOperator, Power, Product, Subtraction, Addition, Quotient, and TreeProjection.

virtual BooleanType Operator::isRationalIn ( int  dim,
VariableType varType,
int *  component,
BooleanType implicit_dep 
) [pure 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

Implemented in NonsmoothOperator, SmoothOperator, Projection, COperator, BinaryOperator, DoubleConstant, Power_Int, UnaryOperator, Power, Product, Subtraction, Addition, Quotient, and TreeProjection.

virtual BooleanType Operator::isSmooth ( ) const [pure virtual]

Checks whether the expression is smooth in time

Returns:
BT_FALSE if the expression is not smooth
BT_TRUE otherwise

Implemented in NonsmoothOperator, and SmoothOperator.

virtual BooleanType Operator::isSymbolic ( ) const [pure virtual]

Asks whether all elements are purely symbolic.

Returns:
BT_TRUE if the complete tree is symbolic.
BT_FALSE otherwise (e.g. if C functions are linked).

Implemented in NonsmoothOperator, SmoothOperator, Projection, DoubleConstant, COperator, Power_Int, BinaryOperator, and UnaryOperator.

BooleanType Operator::isTrivial ( ) const [virtual]

Reimplemented in Projection, and TreeProjection.

Definition at line 514 of file operator.cpp.

virtual BooleanType Operator::isVariable ( VariableType varType,
int &  component 
) const [pure virtual]

Asks the expression whether it is a variable.

Returns:
The answer.

Implemented in NonsmoothOperator, SmoothOperator, Projection, COperator, Power_Int, DoubleConstant, BinaryOperator, and UnaryOperator.

virtual returnValue Operator::loadIndices ( SymbolicIndexList indexList) [pure 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

Implemented in NonsmoothOperator, SmoothOperator, Projection, COperator, Power_Int, DoubleConstant, BinaryOperator, UnaryOperator, and TreeProjection.

Operator * Operator::myAdd ( Operator a,
Operator b 
) [virtual]

Definition at line 246 of file operator.cpp.

Operator * Operator::myLogarithm ( Operator a) [virtual]

Definition at line 304 of file operator.cpp.

Operator * Operator::myPower ( Operator a,
Operator b 
) [virtual]

Definition at line 280 of file operator.cpp.

Operator * Operator::myPowerInt ( Operator a,
int  b 
) [virtual]

Definition at line 293 of file operator.cpp.

Operator * Operator::myProd ( Operator a,
Operator b 
) [virtual]

Definition at line 232 of file operator.cpp.

Operator * Operator::mySubtract ( Operator a,
Operator b 
) [virtual]

Definition at line 263 of file operator.cpp.

Expression Operator::operator* ( const double &  arg) const

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 154 of file operator.cpp.

Expression Operator::operator* ( const DVector arg) const

Definition at line 155 of file operator.cpp.

Expression Operator::operator* ( const DMatrix arg) const

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 156 of file operator.cpp.

Expression Operator::operator* ( const Operator arg) const

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 159 of file operator.cpp.

Expression Operator::operator* ( const Expression arg) const

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 171 of file operator.cpp.

Operator & Operator::operator*= ( const double &  arg)

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 121 of file operator.cpp.

Operator & Operator::operator*= ( const DVector arg)

Definition at line 122 of file operator.cpp.

Operator & Operator::operator*= ( const DMatrix arg)

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 123 of file operator.cpp.

Operator & Operator::operator*= ( const Expression arg)

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 124 of file operator.cpp.

Expression Operator::operator+ ( const double &  arg) const

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 132 of file operator.cpp.

Expression Operator::operator+ ( const DVector arg) const

Definition at line 133 of file operator.cpp.

Expression Operator::operator+ ( const DMatrix arg) const

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 134 of file operator.cpp.

Expression Operator::operator+ ( const Operator arg) const

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 135 of file operator.cpp.

Expression Operator::operator+ ( const Expression arg) const

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 136 of file operator.cpp.

Operator & Operator::operator+= ( const double &  arg)

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 111 of file operator.cpp.

Operator & Operator::operator+= ( const DVector arg)

Definition at line 112 of file operator.cpp.

Operator & Operator::operator+= ( const DMatrix arg)

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 113 of file operator.cpp.

Operator & Operator::operator+= ( const Expression arg)

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 114 of file operator.cpp.

Expression Operator::operator- ( const double &  arg) const

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 142 of file operator.cpp.

Expression Operator::operator- ( const DVector arg) const

Definition at line 143 of file operator.cpp.

Expression Operator::operator- ( const DMatrix arg) const

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 144 of file operator.cpp.

Expression Operator::operator- ( const Operator arg) const

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 145 of file operator.cpp.

Expression Operator::operator- ( const Expression arg) const

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 146 of file operator.cpp.

Expression Operator::operator- ( ) const

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 148 of file operator.cpp.

Operator & Operator::operator-= ( const double &  arg)

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 116 of file operator.cpp.

Operator & Operator::operator-= ( const DVector arg)

Definition at line 117 of file operator.cpp.

Operator & Operator::operator-= ( const DMatrix arg)

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 118 of file operator.cpp.

Operator & Operator::operator-= ( const Expression arg)

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 119 of file operator.cpp.

Expression Operator::operator/ ( const double &  arg) const

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 177 of file operator.cpp.

Expression Operator::operator/ ( const Operator arg) const

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 178 of file operator.cpp.

Expression Operator::operator/ ( const Expression arg) const

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 179 of file operator.cpp.

Operator & Operator::operator/= ( const double &  arg)

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 126 of file operator.cpp.

Operator & Operator::operator/= ( const Expression arg)

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 127 of file operator.cpp.

ConstraintComponent Operator::operator<= ( const double &  ub) const

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 185 of file operator.cpp.

ConstraintComponent Operator::operator<= ( const DVector ub) const

Definition at line 189 of file operator.cpp.

ConstraintComponent Operator::operator<= ( const VariablesGrid ub) const

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 193 of file operator.cpp.

Operator & Operator::operator= ( const double &  arg) [virtual]

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

Reimplemented in TreeProjection, NonsmoothOperator, and SmoothOperator.

Definition at line 56 of file operator.cpp.

Operator & Operator::operator= ( const DVector arg) [virtual]

Definition at line 63 of file operator.cpp.

Operator & Operator::operator= ( const DMatrix arg) [virtual]

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 70 of file operator.cpp.

Operator & Operator::operator= ( const Expression arg) [virtual]

Reimplemented in TreeProjection, NonsmoothOperator, and SmoothOperator.

Definition at line 77 of file operator.cpp.

Operator & Operator::operator= ( const Operator arg) [virtual]

Reimplemented in TreeProjection, NonsmoothOperator, and SmoothOperator.

Definition at line 84 of file operator.cpp.

ConstraintComponent Operator::operator== ( const double &  b) const

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 187 of file operator.cpp.

ConstraintComponent Operator::operator== ( const DVector b) const

Definition at line 191 of file operator.cpp.

ConstraintComponent Operator::operator== ( const VariablesGrid b) const

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 195 of file operator.cpp.

ConstraintComponent Operator::operator>= ( const double &  lb) const

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 186 of file operator.cpp.

ConstraintComponent Operator::operator>= ( const DVector lb) const

Definition at line 190 of file operator.cpp.

ConstraintComponent Operator::operator>= ( const VariablesGrid lb) const

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 194 of file operator.cpp.

Operator * Operator::passArgument ( ) const [virtual]

Returns the argument or NULL if no intermediate argument available

Reimplemented in NonsmoothOperator, SmoothOperator, and TreeProjection.

Definition at line 218 of file operator.cpp.

virtual std::ostream& Operator::print ( std::ostream &  stream) const [pure virtual]

Prints the expression into a stream.

Returns:
SUCCESFUL_RETURN

Implemented in NonsmoothOperator, SmoothOperator, BinaryOperator, Projection, COperator, DoubleConstant, Power_Int, UnaryOperator, Addition, Product, Subtraction, Power, and Quotient.

virtual returnValue Operator::setCurvature ( CurvatureType  curvature_) [pure virtual]

Overwrites the curvature of the expression.
(For the case that the curvature is explicitly known)

Returns:
SUCCESSFUL_RETURN

Implemented in NonsmoothOperator, SmoothOperator, COperator, Projection, DoubleConstant, BinaryOperator, Power_Int, and UnaryOperator.

virtual returnValue Operator::setMonotonicity ( MonotonicityType  monotonicity_) [pure virtual]

Overwrites the monotonicity of the expression.
(For the case that the monotonicity is explicitly known)

Returns:
SUCCESSFUL_RETURN

Implemented in NonsmoothOperator, SmoothOperator, COperator, Projection, DoubleConstant, BinaryOperator, Power_Int, and UnaryOperator.

returnValue Operator::setVariableExportName ( const VariableType _type,
const std::vector< std::string > &  _name 
) [virtual]

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

Returns:
SUCCESSFUL_RETURN

Reimplemented in Projection, UnaryOperator, Power_Int, BinaryOperator, and TreeProjection.

Definition at line 223 of file operator.cpp.

virtual Operator* Operator::substitute ( int  index,
const Operator sub 
) [pure virtual]

Substitutes var(index) with the expression sub.

Returns:
The substituted expression.
Parameters:
indexsubst. index
subthe substitution

Implemented in NonsmoothOperator, SmoothOperator, Projection, COperator, Power, Power_Int, BinaryOperator, DoubleConstant, Product, Subtraction, Addition, Quotient, UnaryOperator, Cos, Exp, Logarithm, Sin, Tan, Acos, Asin, and Atan.


Friends And Related Function Documentation

Expression operator* ( const double &  arg1,
const Operator arg2 
) [friend]

Definition at line 173 of file operator.cpp.

Expression operator* ( const DVector arg1,
const Operator arg2 
) [friend]

Definition at line 174 of file operator.cpp.

Expression operator* ( const DMatrix arg1,
const Operator arg2 
) [friend]

Definition at line 175 of file operator.cpp.

Expression operator+ ( const double &  arg1,
const Operator arg2 
) [friend]

Definition at line 138 of file operator.cpp.

Expression operator+ ( const DVector arg1,
const Operator arg2 
) [friend]

Definition at line 139 of file operator.cpp.

Expression operator+ ( const DMatrix arg1,
const Operator arg2 
) [friend]

Definition at line 140 of file operator.cpp.

Expression operator- ( const double &  arg1,
const Operator arg2 
) [friend]

Definition at line 150 of file operator.cpp.

Expression operator- ( const DVector arg1,
const Operator arg2 
) [friend]

Definition at line 151 of file operator.cpp.

Expression operator- ( const DMatrix arg1,
const Operator arg2 
) [friend]

Definition at line 152 of file operator.cpp.

Expression operator/ ( const double &  arg1,
const Operator arg2 
) [friend]

Definition at line 181 of file operator.cpp.

Expression operator/ ( const DVector arg1,
const Operator arg2 
) [friend]

Definition at line 182 of file operator.cpp.

Expression operator/ ( const DMatrix arg1,
const Operator arg2 
) [friend]

Definition at line 183 of file operator.cpp.

std::ostream& operator<< ( std::ostream &  stream,
const Operator arg 
) [friend]

Prints the expression into a stream ("flush" version).

Returns:
SUCCESFUL_RETURN

Definition at line 213 of file operator.cpp.

ConstraintComponent operator<= ( double  lb,
const Operator arg 
) [friend]

Definition at line 197 of file operator.cpp.

ConstraintComponent operator<= ( DVector  lb,
const Operator arg 
) [friend]

Definition at line 201 of file operator.cpp.

ConstraintComponent operator<= ( VariablesGrid  lb,
const Operator arg 
) [friend]

Definition at line 205 of file operator.cpp.

ConstraintComponent operator== ( double  b,
const Operator arg 
) [friend]

Definition at line 198 of file operator.cpp.

ConstraintComponent operator== ( DVector  b,
const Operator arg 
) [friend]

Definition at line 202 of file operator.cpp.

ConstraintComponent operator== ( VariablesGrid  b,
const Operator arg 
) [friend]

Definition at line 206 of file operator.cpp.

ConstraintComponent operator>= ( double  ub,
const Operator arg 
) [friend]

Definition at line 199 of file operator.cpp.

ConstraintComponent operator>= ( DVector  ub,
const Operator arg 
) [friend]

Definition at line 203 of file operator.cpp.

ConstraintComponent operator>= ( VariablesGrid  ub,
const Operator arg 
) [friend]

Definition at line 207 of file operator.cpp.


Member Data Documentation

Definition at line 642 of file operator.hpp.

Reimplemented in NonsmoothOperator, and SmoothOperator.

Definition at line 556 of file operator.hpp.


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


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Sat Jun 8 2019 19:40:25