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_QUOTIENT_HPP
00036 #define ACADO_TOOLKIT_QUOTIENT_HPP
00037
00038
00039 #include <acado/symbolic_operator/symbolic_operator_fwd.hpp>
00040
00041
00042 BEGIN_NAMESPACE_ACADO
00043
00044
00055 class Quotient : public BinaryOperator{
00056
00057 public:
00058
00060 Quotient();
00061
00063 Quotient( Operator *_argument1, Operator *_argument2 );
00064
00066 Quotient( const Quotient &arg );
00067
00069 ~Quotient();
00070
00072 Quotient& operator=( const Quotient &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
00132 virtual returnValue AD_symmetric( int dim ,
00133 VariableType *varType ,
00134 int *component ,
00135 Operator *l ,
00136 Operator **S ,
00137 int dimS ,
00138 Operator **dfS ,
00139 Operator **ldf ,
00140 Operator **H ,
00141 int &nNewLIS ,
00142 TreeProjection ***newLIS ,
00143 int &nNewSIS ,
00144 TreeProjection ***newSIS ,
00145 int &nNewHIS ,
00146 TreeProjection ***newHIS );
00147
00148
00153 virtual Operator* substitute( int index ,
00154 const Operator *sub );
00155
00156
00157
00165 virtual BooleanType isLinearIn( int dim ,
00166 VariableType *varType ,
00167 int *component,
00168 BooleanType *implicit_dep );
00169
00170
00171
00178 virtual BooleanType isPolynomialIn( int dim ,
00179 VariableType *varType ,
00180 int *component,
00181 BooleanType *implicit_dep );
00182
00183
00184
00191 virtual BooleanType isRationalIn( int dim ,
00192 VariableType *varType ,
00193 int *component,
00194 BooleanType *implicit_dep );
00195
00196
00197
00204 virtual MonotonicityType getMonotonicity( );
00205
00206
00207
00215 virtual CurvatureType getCurvature( );
00216
00217
00219 virtual double getValue() const;
00220
00221
00228 virtual returnValue AD_forward( int number ,
00229 double *seed ,
00230 double *df );
00232
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
00312
00316 virtual Operator* clone() const;
00317
00318
00322 virtual OperatorName getName();
00323
00324
00325 virtual returnValue initDerivative();
00326
00327
00328
00329
00330
00331
00332 protected:
00333
00334
00335
00336
00337
00338
00339 protected:
00340
00341 TreeProjection *derivative0;
00342 TreeProjection *derivative1;
00343 TreeProjection *derivative2;
00345 };
00346
00347
00348 CLOSE_NAMESPACE_ACADO
00349
00350
00351
00352 #endif