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
00034 #ifndef ACADO_TOOLKIT_SUBTRACTION_HPP
00035 #define ACADO_TOOLKIT_SUBTRACTION_HPP
00036
00037
00038 #include <acado/symbolic_operator/symbolic_operator_fwd.hpp>
00039
00040
00041 BEGIN_NAMESPACE_ACADO
00042
00043
00054 class Subtraction : public BinaryOperator{
00055
00056 public:
00057
00058
00060 Subtraction();
00061
00063 Subtraction( Operator *_argument1, Operator *_argument2 );
00064
00066 Subtraction( const Subtraction &arg );
00067
00069 ~Subtraction();
00070
00072 Subtraction& operator=( const Subtraction &arg );
00073
00074
00081 virtual returnValue evaluate( int number ,
00082 double *x ,
00083 double *result );
00084
00085
00087 virtual returnValue evaluate( EvaluationBase *x );
00088
00089
00095 virtual Operator* differentiate( int index );
00096
00097
00098
00104 virtual Operator* AD_forward( int dim ,
00105 VariableType *varType ,
00106 int *component,
00107 Operator **seed ,
00108 int &nNewIS ,
00109 TreeProjection ***newIS );
00110
00111
00112
00118 virtual returnValue AD_backward( int dim ,
00119 VariableType *varType ,
00120 int *component,
00121 Operator *seed ,
00122 Operator **df ,
00123 int &nNewIS ,
00124 TreeProjection ***newIS );
00125
00126
00127
00133 virtual returnValue AD_symmetric( int dim ,
00134 VariableType *varType ,
00135 int *component ,
00136 Operator *l ,
00137 Operator **S ,
00138 int dimS ,
00139 Operator **dfS ,
00140 Operator **ldf ,
00141 Operator **H ,
00142 int &nNewLIS ,
00143 TreeProjection ***newLIS ,
00144 int &nNewSIS ,
00145 TreeProjection ***newSIS ,
00146 int &nNewHIS ,
00147 TreeProjection ***newHIS );
00148
00149
00150
00155 virtual Operator* substitute( int index ,
00156 const Operator *sub );
00157
00158
00159
00167 virtual BooleanType isLinearIn( int dim ,
00168 VariableType *varType ,
00169 int *component,
00170 BooleanType *implicit_dep );
00171
00172
00173
00180 virtual BooleanType isPolynomialIn( int dim ,
00181 VariableType *varType ,
00182 int *component,
00183 BooleanType *implicit_dep );
00184
00185
00186
00193 virtual BooleanType isRationalIn( int dim ,
00194 VariableType *varType ,
00195 int *component,
00196 BooleanType *implicit_dep );
00197
00198
00199
00206 virtual MonotonicityType getMonotonicity( );
00207
00208
00209
00217 virtual CurvatureType getCurvature( );
00218
00219
00221 virtual double getValue() const;
00222
00223
00230 virtual returnValue AD_forward( int number ,
00231 double *seed ,
00232 double *df );
00234
00235
00236
00244 virtual returnValue AD_forward( int number ,
00245 double *x ,
00247 double *seed ,
00248 double *f ,
00250 double *df );
00252
00253
00254
00255
00256
00262 virtual returnValue AD_backward( int number ,
00264 double seed ,
00265 double *df );
00267
00268
00269
00277 virtual returnValue AD_forward2( int number ,
00279 double *seed1 ,
00280 double *seed2 ,
00282 double *df ,
00284 double *ddf );
00286
00287
00288
00289
00290
00291
00297 virtual returnValue AD_backward2( int number ,
00299 double seed1 ,
00300 double seed2 ,
00301 double *df ,
00303 double *ddf );
00305
00306
00307
00311 virtual std::ostream& print( std::ostream &stream ) const;
00312
00313
00317 virtual Operator* clone() const;
00318
00319
00323 virtual OperatorName getName();
00324
00325
00326
00327
00328
00329
00330 protected:
00331
00332
00333
00334
00335
00336
00337
00338 protected:
00339
00340 };
00341
00342
00343 CLOSE_NAMESPACE_ACADO
00344
00345
00346
00347 #endif