Go to the documentation of this file.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
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #ifndef SUNDANCE_STDPRODUCTTRANSFORMATION_H
00043 #define SUNDANCE_STDPRODUCTTRANSFORMATION_H
00044
00045 #include "SundanceDefs.hpp"
00046 #include "SundanceProductTransformationSequence.hpp"
00047
00048 namespace Sundance
00049 {
00050 using namespace Sundance;
00051 using namespace Teuchos;
00052 using namespace Sundance;
00053
00054
00055
00056
00057
00058
00059
00060 class StdProductTransformations : public ProductTransformationSequence
00061 {
00062 public:
00063 StdProductTransformations();
00064
00065 virtual ~StdProductTransformations(){;}
00066 };
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077 class RemoveZeroFromProduct : public ProductTransformation
00078 {
00079 public:
00080
00081 RemoveZeroFromProduct() : ProductTransformation() {;}
00082
00083
00084 virtual ~RemoveZeroFromProduct(){;}
00085
00086
00087 virtual bool doTransform(const RCP<ScalarExpr>& left,
00088 const RCP<ScalarExpr>& right,
00089 RCP<ScalarExpr>& rtn) const ;
00090 };
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102 class RemoveOneFromProduct : public ProductTransformation
00103 {
00104 public:
00105
00106 RemoveOneFromProduct() : ProductTransformation() {;}
00107
00108
00109 virtual ~RemoveOneFromProduct(){;}
00110
00111
00112 virtual bool doTransform(const RCP<ScalarExpr>& left,
00113 const RCP<ScalarExpr>& right,
00114 RCP<ScalarExpr>& rtn) const ;
00115 };
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126 class RemoveMinusOneFromProduct : public ProductTransformation
00127 {
00128 public:
00129
00130 RemoveMinusOneFromProduct() : ProductTransformation() {;}
00131
00132
00133 virtual ~RemoveMinusOneFromProduct(){;}
00134
00135
00136 virtual bool doTransform(const RCP<ScalarExpr>& left,
00137 const RCP<ScalarExpr>& right,
00138 RCP<ScalarExpr>& rtn) const ;
00139 };
00140
00141
00142
00143
00144 class MultiplyConstants : public ProductTransformation
00145 {
00146 public:
00147
00148 MultiplyConstants() : ProductTransformation() {;}
00149
00150
00151 virtual ~MultiplyConstants(){;}
00152
00153
00154 virtual bool doTransform(const RCP<ScalarExpr>& left,
00155 const RCP<ScalarExpr>& right,
00156 RCP<ScalarExpr>& rtn) const ;
00157 };
00158
00159
00160
00161
00162
00163
00164
00165 class MoveConstantsToLeftOfProduct : public ProductTransformation
00166 {
00167 public:
00168
00169 MoveConstantsToLeftOfProduct() : ProductTransformation() {;}
00170
00171
00172 virtual ~MoveConstantsToLeftOfProduct(){;}
00173
00174
00175 virtual bool doTransform(const RCP<ScalarExpr>& left,
00176 const RCP<ScalarExpr>& right,
00177 RCP<ScalarExpr>& rtn) const ;
00178 };
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193 class MoveUnaryMinusOutsideProduct : public ProductTransformation
00194 {
00195 public:
00196
00197 MoveUnaryMinusOutsideProduct() : ProductTransformation() {;}
00198
00199
00200 virtual ~MoveUnaryMinusOutsideProduct(){;}
00201
00202
00203 virtual bool doTransform(const RCP<ScalarExpr>& left,
00204 const RCP<ScalarExpr>& right,
00205 RCP<ScalarExpr>& rtn) const ;
00206 };
00207
00208
00209
00210
00211
00212
00213
00214
00215 class AssociateHungryDiffOpWithOperand : public ProductTransformation
00216 {
00217 public:
00218
00219 AssociateHungryDiffOpWithOperand() : ProductTransformation() {;}
00220
00221
00222 virtual ~AssociateHungryDiffOpWithOperand(){;}
00223
00224
00225 virtual bool doTransform(const RCP<ScalarExpr>& left,
00226 const RCP<ScalarExpr>& right,
00227 RCP<ScalarExpr>& rtn) const ;
00228 };
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239 class KillDiffOpOnConstant : public ProductTransformation
00240 {
00241 public:
00242
00243 KillDiffOpOnConstant() : ProductTransformation() {;}
00244
00245
00246 virtual ~KillDiffOpOnConstant(){;}
00247
00248
00249 virtual bool doTransform(const RCP<ScalarExpr>& left,
00250 const RCP<ScalarExpr>& right,
00251 RCP<ScalarExpr>& rtn) const ;
00252 };
00253
00254
00255
00256
00257
00258
00259
00260 class BringConstantOutsideDiffOp : public ProductTransformation
00261 {
00262 public:
00263
00264 BringConstantOutsideDiffOp() : ProductTransformation() {;}
00265
00266
00267 virtual ~BringConstantOutsideDiffOp(){;}
00268
00269
00270 virtual bool doTransform(const RCP<ScalarExpr>& left,
00271 const RCP<ScalarExpr>& right,
00272 RCP<ScalarExpr>& rtn) const ;
00273 };
00274
00275
00276
00277
00278
00279
00280
00281 class DistributeSumOfDiffOps : public ProductTransformation
00282 {
00283 public:
00284
00285 DistributeSumOfDiffOps() : ProductTransformation() {;}
00286
00287
00288 virtual ~DistributeSumOfDiffOps(){;}
00289
00290
00291 virtual bool doTransform(const RCP<ScalarExpr>& left,
00292 const RCP<ScalarExpr>& right,
00293 RCP<ScalarExpr>& rtn) const ;
00294 };
00295
00296
00297
00298
00299 class ApplySimpleDiffOp : public ProductTransformation
00300 {
00301 public:
00302
00303 ApplySimpleDiffOp() : ProductTransformation() {;}
00304
00305
00306 virtual ~ApplySimpleDiffOp(){;}
00307
00308
00309 virtual bool doTransform(const RCP<ScalarExpr>& left,
00310 const RCP<ScalarExpr>& right,
00311 RCP<ScalarExpr>& rtn) const ;
00312 };
00313
00314
00315
00316
00317
00318
00319
00320
00321
00322
00323
00324
00325 class RearrangeRightProductWithConstant : public ProductTransformation
00326 {
00327 public:
00328
00329 RearrangeRightProductWithConstant() : ProductTransformation() {;}
00330
00331
00332 virtual ~RearrangeRightProductWithConstant(){;}
00333
00334
00335 virtual bool doTransform(const RCP<ScalarExpr>& left,
00336 const RCP<ScalarExpr>& right,
00337 RCP<ScalarExpr>& rtn) const ;
00338 };
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350 class RearrangeLeftProductWithConstant : public ProductTransformation
00351 {
00352 public:
00353
00354 RearrangeLeftProductWithConstant() : ProductTransformation() {;}
00355
00356
00357 virtual ~RearrangeLeftProductWithConstant(){;}
00358
00359
00360 virtual bool doTransform(const RCP<ScalarExpr>& left,
00361 const RCP<ScalarExpr>& right,
00362 RCP<ScalarExpr>& rtn) const ;
00363 };
00364
00365
00366
00367
00368
00369
00370
00371
00372 class TakeConstantUnderIntegralSign : public ProductTransformation
00373 {
00374 public:
00375
00376 TakeConstantUnderIntegralSign() : ProductTransformation() {;}
00377
00378
00379 virtual ~TakeConstantUnderIntegralSign(){;}
00380
00381
00382 virtual bool doTransform(const RCP<ScalarExpr>& left,
00383 const RCP<ScalarExpr>& right,
00384 RCP<ScalarExpr>& rtn) const ;
00385 };
00386 }
00387
00388 #endif