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_STDSUMTRANSFORMATION_H
00043 #define SUNDANCE_STDSUMTRANSFORMATION_H
00044
00045 #include "SundanceDefs.hpp"
00046 #include "SundanceSumTransformationSequence.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 StdSumTransformations : public SumTransformationSequence
00061 {
00062 public:
00063 StdSumTransformations();
00064
00065 virtual ~StdSumTransformations(){;}
00066 };
00067
00068
00069
00070
00071 class IdentifyPolynomialSum : public SumTransformation
00072 {
00073 public:
00074
00075 IdentifyPolynomialSum() : SumTransformation() {;}
00076
00077
00078 virtual ~IdentifyPolynomialSum(){;}
00079
00080
00081 virtual bool doTransform(const RCP<ScalarExpr>& left,
00082 const RCP<ScalarExpr>& right,
00083 int sign, RCP<ScalarExpr>& rtn) const ;
00084 };
00085
00086
00087
00088
00089 class ReorderSum : public SumTransformation
00090 {
00091 public:
00092
00093 ReorderSum() : SumTransformation() {;}
00094
00095
00096 virtual ~ReorderSum(){;}
00097
00098
00099 virtual bool doTransform(const RCP<ScalarExpr>& left,
00100 const RCP<ScalarExpr>& right,
00101 int sign, RCP<ScalarExpr>& rtn) const ;
00102 };
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117 class RemoveUnaryMinusFromSum : public SumTransformation
00118 {
00119 public:
00120
00121 RemoveUnaryMinusFromSum() : SumTransformation() {;}
00122
00123
00124 virtual ~RemoveUnaryMinusFromSum(){;}
00125
00126
00127 virtual bool doTransform(const RCP<ScalarExpr>& left,
00128 const RCP<ScalarExpr>& right,
00129 int sign, RCP<ScalarExpr>& rtn) const ;
00130 };
00131
00132
00133
00134
00135
00136
00137
00138 class RemoveZeroFromSum : public SumTransformation
00139 {
00140 public:
00141
00142 RemoveZeroFromSum() : SumTransformation() {;}
00143
00144
00145 virtual ~RemoveZeroFromSum(){;}
00146
00147
00148 virtual bool doTransform(const RCP<ScalarExpr>& left,
00149 const RCP<ScalarExpr>& right,
00150 int sign, RCP<ScalarExpr>& rtn) const ;
00151 };
00152
00153
00154
00155
00156 class SumConstants : public SumTransformation
00157 {
00158 public:
00159
00160 SumConstants() : SumTransformation() {;}
00161
00162
00163 virtual ~SumConstants(){;}
00164
00165
00166 virtual bool doTransform(const RCP<ScalarExpr>& left,
00167 const RCP<ScalarExpr>& right,
00168 int sign, RCP<ScalarExpr>& rtn) const ;
00169 };
00170
00171
00172
00173
00174
00175
00176
00177 class MoveConstantsToLeftOfSum : public SumTransformation
00178 {
00179 public:
00180
00181 MoveConstantsToLeftOfSum() : SumTransformation() {;}
00182
00183
00184 virtual ~MoveConstantsToLeftOfSum(){;}
00185
00186
00187 virtual bool doTransform(const RCP<ScalarExpr>& left,
00188 const RCP<ScalarExpr>& right,
00189 int sign, RCP<ScalarExpr>& rtn) const ;
00190 };
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203 class RearrangeRightSumWithConstant : public SumTransformation
00204 {
00205 public:
00206
00207 RearrangeRightSumWithConstant() : SumTransformation() {;}
00208
00209
00210 virtual ~RearrangeRightSumWithConstant(){;}
00211
00212
00213 virtual bool doTransform(const RCP<ScalarExpr>& left,
00214 const RCP<ScalarExpr>& right,
00215 int sign, RCP<ScalarExpr>& rtn) const ;
00216 };
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228 class RearrangeLeftSumWithConstant : public SumTransformation
00229 {
00230 public:
00231
00232 RearrangeLeftSumWithConstant() : SumTransformation() {;}
00233
00234
00235 virtual ~RearrangeLeftSumWithConstant(){;}
00236
00237
00238 virtual bool doTransform(const RCP<ScalarExpr>& left,
00239 const RCP<ScalarExpr>& right,
00240 int sign, RCP<ScalarExpr>& rtn) const ;
00241 };
00242
00243
00244
00245
00246
00247 class SumIntegrals : public SumTransformation
00248 {
00249 public:
00250
00251 SumIntegrals() : SumTransformation() {;}
00252
00253
00254 virtual ~SumIntegrals(){;}
00255
00256
00257 virtual bool doTransform(const RCP<ScalarExpr>& left,
00258 const RCP<ScalarExpr>& right,
00259 int sign, RCP<ScalarExpr>& rtn) const ;
00260 };
00261 }
00262
00263
00264 #endif