Skip to content
Snippets Groups Projects
Commit acbc9fb7 authored by Taddeus Kroes's avatar Taddeus Kroes
Browse files

Added inequivalence operator to ExpressionBase.

parent db692be1
No related branches found
No related tags found
No related merge requests found
......@@ -105,3 +105,5 @@ Division of 0 by 1 reduces to 0.
- Line generator: 'der(f(x), x)' -> 'd/dx f(x)'
- Create unit tests for parser preprocessor.
- Create unit tests for node inequivalece operator.
......@@ -165,6 +165,12 @@ class ExpressionBase(object):
return s_root < o_root or s_exp < o_exp or s_coeff < o_coeff
def __ne__(self, other):
"""
Check strict inequivalence, using the strict equivalence operator.
"""
return not (self == other)
def is_op(self, *ops):
return not self.is_leaf and self.op in ops
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment