256 return ADsymCommon2(
argument1,
argument2,dx,dy,dxx,dxy,dyy, dim, varType, component, l, S, dimS, dfS,
257 ldf, H, nNewLIS, newLIS, nNewSIS, newSIS, nNewHIS, newHIS );
377 if( res >= 1.0 )
return m2;
389 if( res >= 0.0 )
return m1;
439 if( res >= 1.0 || res < 0.0 )
return CT_CONVEX ;
440 if( res < 1.0 && res >= 0.0 )
return CT_CONCAVE;
451 if( res <= 1.0 && res >= 0.0 )
return CT_CONCAVE;
460 double *f,
double *df ){
512 double *df,
double *ddf ){
514 double ddargument1_result;
515 double ddargument2_result;
516 double dargument_result1 ;
517 double dargument_result2 ;
520 &dargument_result1, &ddargument1_result);
522 &dargument_result2, &ddargument2_result);
528 const double nn5 = nn1*nn3;
529 const double nn6 = nn2*(argument2_result[number]*nn3 + 1.0);
531 df[0] = nn4*dargument_result1
532 +nn5*dargument_result2;
533 ddf[0] = nn4*ddargument1_result
534 +nn5*ddargument2_result
535 +argument2_result[number]*(argument2_result[number]-1.0)
546 double *df,
double *ddf ){
552 const double nn5 = nn1*nn3;
553 const double nn6 = nn2*(argument2_result[number]*nn3 + 1.0);
558 argument2_result[number]*(argument2_result[number]-1.0)*
560 argument2_result[number]-2.0 )*
580 return stream <<
"(sqrt(" << *
argument1 <<
"))";
586 return stream <<
"(1.0/sqrt(" << *
argument1 <<
"))";
598 return new Power(*
this);
virtual returnValue AD_backward2(int number, double seed1, double seed2, double *df, double *ddf)
virtual returnValue AD_forward2(int number, double *seed1, double *seed2, double *df, double *ddf)=0
virtual MonotonicityType getMonotonicity()=0
virtual BooleanType isPolynomialIn(int dim, VariableType *varType, int *component, BooleanType *implicit_dep)
virtual Operator * AD_forward(int dim, VariableType *varType, int *component, Operator **seed, int &nNewIS, TreeProjection ***newIS)
Abstract base class for all scalar-valued binary operators within the symbolic operators family...
virtual BooleanType isLinearIn(int dim, VariableType *varType, int *component, BooleanType *implicit_dep)
Abstract base class for all scalar-valued symbolic operators.
TreeProjection * derivative02
virtual BooleanType isDependingOn(VariableType var) const =0
BooleanType acadoIsEqual(double x, double y, double TOL)
virtual NeutralElement isOneOrZero() const =0
virtual CurvatureType getCurvature()
virtual Operator * substitute(int index, const Operator *sub)
virtual returnValue evaluate(int number, double *x, double *result)
double * argument1_result
virtual Operator * differentiate(int index)=0
TreeProjection * derivative22
Allows to pass back messages to the calling function.
virtual void power(Operator &arg1, Operator &arg2)=0
Implements the scalar power operator within the symbolic operators family.
virtual Operator * clone() const =0
virtual MonotonicityType getMonotonicity()
IntermediateState pow(const Expression &arg1, const Expression &arg2)
virtual Operator * substitute(int index, const Operator *sub)=0
virtual double getValue() const
virtual BooleanType isDependingOn(VariableType var) const
#define CLOSE_NAMESPACE_ACADO
TreeProjection * derivative12
double * dargument2_result
virtual Operator * mySubtract(Operator *a, Operator *b)
virtual returnValue initDerivative()
virtual Operator * AD_forward(int dim, VariableType *varType, int *component, Operator **seed, int &nNewIS, TreeProjection ***newIS)=0
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 std::ostream & print(std::ostream &stream) const
TreeProjection * derivative21
virtual returnValue AD_backward2(int number, double seed1, double seed2, double *df, double *ddf)=0
virtual returnValue AD_backward(int dim, VariableType *varType, int *component, Operator *seed, Operator **df, int &nNewIS, TreeProjection ***newIS)
MonotonicityType monotonicity
virtual OperatorName getName()
virtual Operator * myProd(Operator *a, Operator *b)
double * argument2_result
virtual returnValue AD_backward(int dim, VariableType *varType, int *component, Operator *seed, Operator **df, int &nNewIS, TreeProjection ***newIS)=0
virtual BooleanType isRationalIn(int dim, VariableType *varType, int *component, BooleanType *implicit_dep)
double * dargument1_result
virtual returnValue initDerivative()
virtual Operator * myAdd(Operator *a, Operator *b)
virtual BooleanType isLinearIn(int dim, VariableType *varType, int *component, BooleanType *implicit_dep)=0
virtual returnValue evaluate(int number, double *x, double *result)=0
virtual returnValue AD_forward2(int number, double *seed1, double *seed2, double *df, double *ddf)
virtual BooleanType isPolynomialIn(int dim, VariableType *varType, int *component, BooleanType *implicit_dep)=0
virtual Operator * myLogarithm(Operator *a)
Implements the tree-projection operator within the family of SymbolicOperators.
virtual Operator * differentiate(int index)
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 TreeProjection * convert2TreeProjection(Operator *a) const
BinaryOperator & operator=(const BinaryOperator &arg)
#define BEGIN_NAMESPACE_ACADO
TreeProjection * derivative01
Abstract base class for templated evaluation of operators.
virtual CurvatureType getCurvature()=0
virtual BooleanType isRationalIn(int dim, VariableType *varType, int *component, BooleanType *implicit_dep)=0
Power & operator=(const Power &arg)
virtual TreeProjection * clone() const
TreeProjection * derivative23
virtual Operator * myPower(Operator *a, Operator *b)
virtual Operator * clone() const
Implements a scalar constant within the symbolic operators family.
Implements the scalar product operator within the symbolic operators family.
IntermediateState log(const Expression &arg)