mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-27 01:29:58 +01:00
[poincare] Parenthesis simplify
Change-Id: I2ebcc1d5148eacb087be407559e5593c6ac6641e
This commit is contained in:
@@ -16,6 +16,8 @@ private:
|
||||
Evaluation<float> * privateEvaluate(SinglePrecision p, Context& context, AngleUnit angleUnit) const override { return templatedEvaluate<float>(context, angleUnit); }
|
||||
Evaluation<double> * privateEvaluate(DoublePrecision p, Context& context, AngleUnit angleUnit) const override { return templatedEvaluate<double>(context, angleUnit); }
|
||||
template<typename T> Evaluation<T> * templatedEvaluate(Context& context, AngleUnit angleUnit) const;
|
||||
/* Simplification */
|
||||
void privateSimplify() override;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -23,6 +23,10 @@ ExpressionLayout * Parenthesis::privateCreateLayout(FloatDisplayMode floatDispla
|
||||
return new ParenthesisLayout(operand(0)->createLayout(floatDisplayMode, complexFormat));
|
||||
}
|
||||
|
||||
void Parenthesis::privateSimplify() {
|
||||
replaceWith(const_cast<Expression *>(operand(0)), true);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
Evaluation<T> * Parenthesis::templatedEvaluate(Context& context, AngleUnit angleUnit) const {
|
||||
return operand(0)->evaluate<T>(context, angleUnit);
|
||||
|
||||
Reference in New Issue
Block a user