Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
trs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
trs
Commits
acbc9fb7
Commit
acbc9fb7
authored
Mar 20, 2012
by
Taddeus Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added inequivalence operator to ExpressionBase.
parent
db692be1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
TODO
TODO
+2
-0
src/node.py
src/node.py
+6
-0
No files found.
TODO
View file @
acbc9fb7
...
...
@@ -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.
src/node.py
View file @
acbc9fb7
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment