mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[poincare] recursivelyMatches takes replaceSymbols parameter
This fixes: [7]->a 1+2->a The second operation would get interrupted because 'a' is a matrix if symbols are replaced
This commit is contained in:
@@ -28,7 +28,7 @@ void Equation::tidy() {
|
||||
Expression Equation::standardForm(Context * context) const {
|
||||
if (m_standardForm.isUninitialized()) {
|
||||
const Expression e = expression(context);
|
||||
if (e.recursivelyMatches([](const Expression e, Context & context) { return e.type() == ExpressionNode::Type::Undefined || e.type() == ExpressionNode::Type::Infinity || Expression::IsMatrix(e, context); }, *context)) {
|
||||
if (e.recursivelyMatches([](const Expression e, Context & context, bool replaceSymbols) { return e.type() == ExpressionNode::Type::Undefined || e.type() == ExpressionNode::Type::Infinity || Expression::IsMatrix(e, context, replaceSymbols); }, *context, true)) {
|
||||
m_standardForm = Undefined();
|
||||
return m_standardForm;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user