00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00035 #ifndef ACADO_TOOLKIT_POWER_HPP
00036 #define ACADO_TOOLKIT_POWER_HPP
00037
00038
00039 #include <acado/symbolic_operator/symbolic_operator_fwd.hpp>
00040
00041
00042 BEGIN_NAMESPACE_ACADO
00043
00044
00045
00056 class Power : public BinaryOperator{
00057
00058 public:
00059
00060
00062 Power();
00063
00065 Power( Operator *_argument1, Operator *_argument2 );
00066
00068 Power( const Power &arg );
00069
00071 ~Power();
00072
00074 Power& operator=( const Power &arg );
00075
00076
00077
00084 virtual returnValue evaluate( int number ,
00085 double *x ,
00086 double *result );
00087
00088
00090 virtual returnValue evaluate( EvaluationBase *x );
00091
00092
00098 virtual Operator* differentiate( int index );
00099
00100
00101
00107 virtual Operator* AD_forward( int dim ,
00108 VariableType *varType ,
00109 int *component,
00110 Operator **seed ,
00111 int &nNewIS ,
00112 TreeProjection ***newIS );
00113
00114
00115
00121 virtual returnValue AD_backward( int dim ,
00122 VariableType *varType ,
00123 int *component,
00124 Operator *seed ,
00125 Operator **df ,
00126 int &nNewIS ,
00127 TreeProjection ***newIS );
00128
00129
00130
00136 virtual returnValue AD_symmetric( int dim ,
00137 VariableType *varType ,
00138 int *component ,
00139 Operator *l ,
00140 Operator **S ,
00141 int dimS ,
00142 Operator **dfS ,
00143 Operator **ldf ,
00144 Operator **H ,
00145 int &nNewLIS ,
00146 TreeProjection ***newLIS ,
00147 int &nNewSIS ,
00148 TreeProjection ***newSIS ,
00149 int &nNewHIS ,
00150 TreeProjection ***newHIS );
00151
00152
00157 virtual Operator* substitute( int index ,
00158 const Operator *sub );
00159
00160
00161
00169 virtual BooleanType isLinearIn( int dim ,
00170 VariableType *varType ,
00171 int *component,
00172 BooleanType *implicit_dep );
00173
00174
00175
00182 virtual BooleanType isPolynomialIn( int dim ,
00183 VariableType *varType ,
00184 int *component,
00185 BooleanType *implicit_dep );
00186
00187
00188
00195 virtual BooleanType isRationalIn( int dim ,
00196 VariableType *varType ,
00197 int *component,
00198 BooleanType *implicit_dep );
00199
00200
00201
00208 virtual MonotonicityType getMonotonicity( );
00209
00210
00211
00219 virtual CurvatureType getCurvature( );
00220
00221
00222
00229 virtual returnValue AD_forward( int number ,
00230 double *seed ,
00231 double *df );
00233
00234
00235
00243 virtual returnValue AD_forward( int number ,
00244 double *x ,
00246 double *seed ,
00247 double *f ,
00249 double *df );
00251
00252
00253
00254
00255
00261 virtual returnValue AD_backward( int number ,
00263 double seed ,
00264 double *df );
00266
00267
00268
00276 virtual returnValue AD_forward2( int number ,
00278 double *seed1 ,
00279 double *seed2 ,
00281 double *df ,
00283 double *ddf );
00285
00286
00287
00288
00289
00290
00296 virtual returnValue AD_backward2( int number ,
00298 double seed1 ,
00299 double seed2 ,
00300 double *df ,
00302 double *ddf );
00304
00305
00309 virtual std::ostream& print( std::ostream &stream ) const;
00310
00311
00315 virtual Operator* clone() const;
00316
00317
00321 virtual OperatorName getName();
00322
00323
00324 virtual returnValue initDerivative();
00325
00326
00327
00328
00329
00330
00331
00332 protected:
00333
00334 TreeProjection *derivative01;
00335 TreeProjection *derivative02;
00337 TreeProjection *derivative12;
00339 TreeProjection *derivative21;
00340 TreeProjection *derivative22;
00341 TreeProjection *derivative23;
00344
00345
00346
00347
00348 protected:
00349
00350 };
00351
00352
00353 CLOSE_NAMESPACE_ACADO
00354
00355
00356
00357 #endif