Abstract base class for all scalar-valued symbolic operators. More...
#include <operator.hpp>
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 Operator * | AD_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 Operator * | clone () const =0 |
virtual TreeProjection * | cloneTreeProjection () const |
virtual Operator * | differentiate (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 Operator * | myAdd (Operator *a, Operator *b) |
virtual Operator * | myLogarithm (Operator *a) |
virtual Operator * | myPower (Operator *a, Operator *b) |
virtual Operator * | myPowerInt (Operator *a, int b) |
virtual Operator * | myProd (Operator *a, Operator *b) |
virtual Operator * | mySubtract (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 |
Operator & | operator*= (const double &arg) |
Operator & | operator*= (const DVector &arg) |
Operator & | operator*= (const DMatrix &arg) |
Operator & | operator*= (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 |
Operator & | operator+= (const double &arg) |
Operator & | operator+= (const DVector &arg) |
Operator & | operator+= (const DMatrix &arg) |
Operator & | operator+= (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 |
Operator & | operator-= (const double &arg) |
Operator & | operator-= (const DVector &arg) |
Operator & | operator-= (const DMatrix &arg) |
Operator & | operator-= (const Expression &arg) |
Expression | operator/ (const double &arg) const |
Expression | operator/ (const Operator &arg) const |
Expression | operator/ (const Expression &arg) const |
Operator & | operator/= (const double &arg) |
Operator & | operator/= (const Expression &arg) |
ConstraintComponent | operator<= (const double &ub) const |
ConstraintComponent | operator<= (const DVector &ub) const |
ConstraintComponent | operator<= (const VariablesGrid &ub) const |
virtual Operator & | operator= (const double &arg) |
virtual Operator & | operator= (const DVector &arg) |
virtual Operator & | operator= (const DMatrix &arg) |
virtual Operator & | operator= (const Expression &arg) |
virtual Operator & | operator= (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 Operator * | passArgument () 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 Operator * | substitute (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 TreeProjection * | convert2TreeProjection (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) |
Abstract base class for all scalar-valued symbolic operators.
The class Operator serves as an abstract base class for all scalar-valued symbolic operators.
Definition at line 60 of file operator.hpp.
Default constructor.
Definition at line 47 of file operator.cpp.
Operator::~Operator | ( | ) | [virtual] |
Definition at line 53 of file operator.cpp.
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
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 |
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
number | the buffer position |
seed | the seed |
df | the 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.
number | the buffer position |
seed1 | the seed1 |
seed2 | the seed2 |
df | the 1st derivative of the expression |
ddf | the 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
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 |
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)
number | storage position |
x | The evaluation point x |
seed | the seed |
f | the value of the expression at x |
df | the 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
number | storage position |
seed | the seed |
df | the 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.
number | the buffer position |
seed1 | the seed |
seed2 | the seed for the first derivative |
df | the derivative of the expression |
ddf | the 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.
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 |
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] |
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 |
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] |
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 |
Definition at line 387 of file operator.cpp.
virtual returnValue Operator::clearBuffer | ( | ) | [pure virtual] |
Clears the buffer and resets the buffer size
to 1.
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.
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.
TreeProjection * Operator::cloneTreeProjection | ( | ) | const [virtual] |
Provides a deep copy of a tree projection.
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).
index | diff. 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.
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)
number | storage position |
x | the input variable x |
result | the 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] |
Evaluates the expression (templated version)
Implemented in NonsmoothOperator, SmoothOperator, Projection, COperator, Power, BinaryOperator, DoubleConstant, Power_Int, Product, UnaryOperator, Quotient, Subtraction, Addition, Acos, Atan, Cos, Exp, Logarithm, Sin, Tan, and Asin.
virtual CurvatureType Operator::getCurvature | ( | ) | [pure virtual] |
Returns the curvature of the expression
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.
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.
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.
returnValue Operator::initDerivative | ( | ) | [virtual] |
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.
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
dim | number of directions |
varType | the variable types |
component | and their components |
implicit_dep | implicit 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
dim | number of directions |
varType | the variable types |
component | and their components |
implicit_dep | implicit 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
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
dim | number of directions |
varType | the variable types |
component | and their components |
implicit_dep | implicit 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
dim | number of directions |
varType | the variable types |
component | and their components |
implicit_dep | implicit 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
Implemented in NonsmoothOperator, and SmoothOperator.
virtual BooleanType Operator::isSymbolic | ( | ) | const [pure virtual] |
Asks whether all elements are purely symbolic.
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.
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.
indexList | The 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.
Definition at line 122 of file operator.cpp.
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.
Definition at line 112 of file operator.cpp.
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.
Definition at line 117 of file operator.cpp.
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.
Definition at line 63 of file operator.cpp.
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.
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.
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)
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)
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.
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.
index | subst. index |
sub | the 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.
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).
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.
BooleanType Operator::initialized [protected] |
Definition at line 642 of file operator.hpp.
int Operator::nCount |
Reimplemented in NonsmoothOperator, and SmoothOperator.
Definition at line 556 of file operator.hpp.