@@ -100,35 +100,35 @@ class Expr : public IMath<ExprPtr>, public IRepresentableMath, public std::enabl
100
100
double evaluate (const VariableMap& variables) override ;
101
101
virtual double evaluate ();
102
102
103
- virtual bool equals (ExprPtr expression);
104
- virtual bool _equals (ExprPtr expression);
103
+ virtual bool equals (const ExprPtr& expression);
104
+ virtual bool _equals (const ExprPtr& expression);
105
105
106
106
virtual ExprPtr clone ();
107
107
108
108
ExprPtr derivative (char var) override ;
109
109
virtual ExprPtr _derivative (char var);
110
110
111
111
ExprPtr simplified () override ;
112
- bool isEquivalent (ExprPtr expression) override ;
112
+ bool isEquivalent (const ExprPtr& expression) override ;
113
113
114
- ProdPtr multiply (ExprPtr expression);
114
+ ProdPtr multiply (const ExprPtr& expression);
115
115
ProdPtr multiply (double value);
116
- SumPtr add (ExprPtr expression);
117
- SumPtr subtract (ExprPtr expression);
116
+ SumPtr add (const ExprPtr& expression);
117
+ SumPtr subtract (const ExprPtr& expression);
118
118
SumPtr add (double value);
119
119
SumPtr subtract (double value);
120
- DividePtr divide (ExprPtr expression);
120
+ DividePtr divide (const ExprPtr& expression);
121
121
DividePtr divide (double divisor);
122
122
NegatePtr negate ();
123
123
124
- PowerPtr power (ExprPtr expression);
124
+ PowerPtr power (const ExprPtr& expression);
125
125
PowerPtr power (double exponent);
126
126
ExpPtr exp ();
127
- LogPtr log (ExprPtr base);
127
+ LogPtr log (const ExprPtr& base);
128
128
LogPtr log (double base);
129
129
LnPtr ln ();
130
130
131
- RootPtr root (ExprPtr root);
131
+ RootPtr root (const ExprPtr& root);
132
132
RootPtr root (double root);
133
133
SqrtPtr sqrt ();
134
134
CbrtPtr cbrt ();
@@ -151,15 +151,15 @@ class Expr : public IMath<ExprPtr>, public IRepresentableMath, public std::enabl
151
151
CeilPtr ceil ();
152
152
RoundPtr round ();
153
153
SignPtr sign ();
154
- ModPtr mod (ExprPtr expression);
154
+ ModPtr mod (const ExprPtr& expression);
155
155
156
156
ExprPtr reciprocal ();
157
157
158
158
bool operator <(const Expr& expression) const ;
159
159
160
- bool lessThan (ExprPtr expression) const ;
160
+ bool lessThan (const ExprPtr& expression) const ;
161
161
162
- static bool compare (ExprPtr left, ExprPtr right);
162
+ static bool compare (const ExprPtr& left, const ExprPtr& right);
163
163
164
164
ExpressionProperties getProperties () const ;
165
165
@@ -171,7 +171,7 @@ class Expr : public IMath<ExprPtr>, public IRepresentableMath, public std::enabl
171
171
172
172
bool isOfType (ExpressionType type) const ;
173
173
174
- bool isOfSameType (ExprPtr expression) const ;
174
+ bool isOfSameType (const ExprPtr& expression) const ;
175
175
176
176
// TODO overload math operators + - * / ^
177
177
0 commit comments