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
aed5ec18
Commit
aed5ec18
authored
Nov 17, 2012
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Multiplication sign is not omitted anymore for multiplication of equal identifiers
parent
3e5a2ac4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
56 deletions
+56
-56
external/graph_drawing
external/graph_drawing
+1
-1
tests/test_leiden_oefenopgave.py
tests/test_leiden_oefenopgave.py
+42
-42
tests/test_leiden_oefenopgave_v12.py
tests/test_leiden_oefenopgave_v12.py
+13
-13
No files found.
graph_drawing
@
c8ecf708
Subproject commit
0e6c5e55add6e924a4201a2132457e9b3c7e26d0
Subproject commit
c8ecf7081c6b944228a208617ad539e67091ef78
tests/test_leiden_oefenopgave.py
View file @
aed5ec18
...
@@ -42,23 +42,23 @@ class TestLeidenOefenopgave(TestCase):
...
@@ -42,23 +42,23 @@ class TestLeidenOefenopgave(TestCase):
'(x + 1) ^ 3'
,
'(x + 1) ^ 3'
,
'(x + 1)(x + 1) ^ 2'
,
'(x + 1)(x + 1) ^ 2'
,
'(x + 1)(x + 1)(x + 1)'
,
'(x + 1)(x + 1)(x + 1)'
,
'(xx + x * 1 + 1x + 1 * 1)(x + 1)'
,
'(x
*
x + x * 1 + 1x + 1 * 1)(x + 1)'
,
'(xx + x + 1x + 1 * 1)(x + 1)'
,
'(x
*
x + x + 1x + 1 * 1)(x + 1)'
,
'(xx + x + x + 1 * 1)(x + 1)'
,
'(x
*
x + x + x + 1 * 1)(x + 1)'
,
'(xx + x + x + 1)(x + 1)'
,
'(x
*
x + x + x + 1)(x + 1)'
,
'(xx + (1 + 1)x + 1)(x + 1)'
,
'(x
*
x + (1 + 1)x + 1)(x + 1)'
,
'(xx + 2x + 1)(x + 1)'
,
'(x
*
x + 2x + 1)(x + 1)'
,
'(x ^ (1 + 1) + 2x + 1)(x + 1)'
,
'(x ^ (1 + 1) + 2x + 1)(x + 1)'
,
'(x ^ 2 + 2x + 1)(x + 1)'
,
'(x ^ 2 + 2x + 1)(x + 1)'
,
'x ^ 2 * x + x ^ 2 * 1 + 2xx + 2x * 1 + 1x + 1 * 1'
,
'x ^ 2 * x + x ^ 2 * 1 + 2x
*
x + 2x * 1 + 1x + 1 * 1'
,
'x ^ 2 * x + x ^ 2 + 2xx + 2x * 1 + 1x + 1 * 1'
,
'x ^ 2 * x + x ^ 2 + 2x
*
x + 2x * 1 + 1x + 1 * 1'
,
'x ^ 2 * x + x ^ 2 + 2xx + 2x + 1x + 1 * 1'
,
'x ^ 2 * x + x ^ 2 + 2x
*
x + 2x + 1x + 1 * 1'
,
'x ^ 2 * x + x ^ 2 + 2xx + 2x + x + 1 * 1'
,
'x ^ 2 * x + x ^ 2 + 2x
*
x + 2x + x + 1 * 1'
,
'x ^ 2 * x + x ^ 2 + 2xx + 2x + x + 1'
,
'x ^ 2 * x + x ^ 2 + 2x
*
x + 2x + x + 1'
,
'x ^ 2 * x + x ^ 2 + 2xx + (2 + 1)x + 1'
,
'x ^ 2 * x + x ^ 2 + 2x
*
x + (2 + 1)x + 1'
,
'x ^ 2 * x + x ^ 2 + 2xx + 3x + 1'
,
'x ^ 2 * x + x ^ 2 + 2x
*
x + 3x + 1'
,
'x ^ (2 + 1) + x ^ 2 + 2xx + 3x + 1'
,
'x ^ (2 + 1) + x ^ 2 + 2x
*
x + 3x + 1'
,
'x ^ 3 + x ^ 2 + 2xx + 3x + 1'
,
'x ^ 3 + x ^ 2 + 2x
*
x + 3x + 1'
,
'x ^ 3 + x ^ 2 + 2x ^ (1 + 1) + 3x + 1'
,
'x ^ 3 + x ^ 2 + 2x ^ (1 + 1) + 3x + 1'
,
'x ^ 3 + x ^ 2 + 2x ^ 2 + 3x + 1'
,
'x ^ 3 + x ^ 2 + 2x ^ 2 + 3x + 1'
,
'x ^ 3 + (1 + 2)x ^ 2 + 3x + 1'
,
'x ^ 3 + (1 + 2)x ^ 2 + 3x + 1'
,
...
@@ -69,12 +69,12 @@ class TestLeidenOefenopgave(TestCase):
...
@@ -69,12 +69,12 @@ class TestLeidenOefenopgave(TestCase):
self
.
assertRewrite
([
self
.
assertRewrite
([
'(x + 1) ^ 2'
,
'(x + 1) ^ 2'
,
'(x + 1)(x + 1)'
,
'(x + 1)(x + 1)'
,
'xx + x * 1 + 1x + 1 * 1'
,
'x
*
x + x * 1 + 1x + 1 * 1'
,
'xx + x + 1x + 1 * 1'
,
'x
*
x + x + 1x + 1 * 1'
,
'xx + x + x + 1 * 1'
,
'x
*
x + x + x + 1 * 1'
,
'xx + x + x + 1'
,
'x
*
x + x + x + 1'
,
'xx + (1 + 1)x + 1'
,
'x
*
x + (1 + 1)x + 1'
,
'xx + 2x + 1'
,
'x
*
x + 2x + 1'
,
'x ^ (1 + 1) + 2x + 1'
,
'x ^ (1 + 1) + 2x + 1'
,
'x ^ 2 + 2x + 1'
,
'x ^ 2 + 2x + 1'
,
])
])
...
@@ -83,16 +83,16 @@ class TestLeidenOefenopgave(TestCase):
...
@@ -83,16 +83,16 @@ class TestLeidenOefenopgave(TestCase):
self
.
assertRewrite
([
self
.
assertRewrite
([
'(x - 1) ^ 2'
,
'(x - 1) ^ 2'
,
'(x - 1)(x - 1)'
,
'(x - 1)(x - 1)'
,
'xx + x * -1 + (-1)x + (-1) * -1'
,
'x
*
x + x * -1 + (-1)x + (-1) * -1'
,
'xx + x * -1 + (-1)x - -1'
,
'x
*
x + x * -1 + (-1)x - -1'
,
'xx + x * -1 + (-1)x + 1'
,
'x
*
x + x * -1 + (-1)x + 1'
,
'xx - x * 1 + (-1)x + 1'
,
'x
*
x - x * 1 + (-1)x + 1'
,
'xx - x + (-1)x + 1'
,
'x
*
x - x + (-1)x + 1'
,
'xx - x - 1x + 1'
,
'x
*
x - x - 1x + 1'
,
'xx - x - x + 1'
,
'x
*
x - x - x + 1'
,
'xx + (1 + 1) * -x + 1'
,
'x
*
x + (1 + 1) * -x + 1'
,
'xx + 2 * -x + 1'
,
'x
*
x + 2 * -x + 1'
,
'xx - 2x + 1'
,
'x
*
x - 2x + 1'
,
'x ^ (1 + 1) - 2x + 1'
,
'x ^ (1 + 1) - 2x + 1'
,
'x ^ 2 - 2x + 1'
,
'x ^ 2 - 2x + 1'
,
])
])
...
@@ -134,8 +134,8 @@ class TestLeidenOefenopgave(TestCase):
...
@@ -134,8 +134,8 @@ class TestLeidenOefenopgave(TestCase):
def
test_1_5
(
self
):
def
test_1_5
(
self
):
self
.
assertRewrite
([
self
.
assertRewrite
([
'(2x + x)x'
,
'(2x + x)x'
,
'(2 + 1)xx'
,
'(2 + 1)x
*
x'
,
'3xx'
,
'3x
*
x'
,
'3x ^ (1 + 1)'
,
'3x ^ (1 + 1)'
,
'3x ^ 2'
,
'3x ^ 2'
,
])
])
...
@@ -146,15 +146,15 @@ class TestLeidenOefenopgave(TestCase):
...
@@ -146,15 +146,15 @@ class TestLeidenOefenopgave(TestCase):
'-(4x + 5)(5 - 4x)'
,
'-(4x + 5)(5 - 4x)'
,
'-(4x * 5 + 4x * -4x + 5 * 5 + 5 * -4x)'
,
'-(4x * 5 + 4x * -4x + 5 * 5 + 5 * -4x)'
,
'-(20x + 4x * -4x + 5 * 5 + 5 * -4x)'
,
'-(20x + 4x * -4x + 5 * 5 + 5 * -4x)'
,
'-(20x + (-16)xx + 5 * 5 + 5 * -4x)'
,
'-(20x + (-16)x
*
x + 5 * 5 + 5 * -4x)'
,
'-(20x + (-16)xx + 25 + 5 * -4x)'
,
'-(20x + (-16)x
*
x + 25 + 5 * -4x)'
,
'-(20x + (-16)xx + 25 + (-20)x)'
,
'-(20x + (-16)x
*
x + 25 + (-20)x)'
,
'-(20x - 16xx + 25 + (-20)x)'
,
'-(20x - 16x
*
x + 25 + (-20)x)'
,
'-(20x - 16xx + 25 - 20x)'
,
'-(20x - 16x
*
x + 25 - 20x)'
,
'-((1 - 1)20x - 16xx + 25)'
,
'-((1 - 1)20x - 16x
*
x + 25)'
,
'-(0 * 20x - 16xx + 25)'
,
'-(0 * 20x - 16x
*
x + 25)'
,
'-(0 - 16xx + 25)'
,
'-(0 - 16x
*
x + 25)'
,
'-(-16xx + 25)'
,
'-(-16x
*
x + 25)'
,
'-(-16x ^ (1 + 1) + 25)'
,
'-(-16x ^ (1 + 1) + 25)'
,
'-(-16x ^ 2 + 25)'
,
'-(-16x ^ 2 + 25)'
,
'--16x ^ 2 - 25'
,
'--16x ^ 2 - 25'
,
...
...
tests/test_leiden_oefenopgave_v12.py
View file @
aed5ec18
...
@@ -19,8 +19,8 @@ class TestLeidenOefenopgaveV12(TestCase):
...
@@ -19,8 +19,8 @@ class TestLeidenOefenopgaveV12(TestCase):
def
test_1_d
(
self
):
def
test_1_d
(
self
):
self
.
assertRewrite
([
self
.
assertRewrite
([
'(2x + x)x'
,
'(2x + x)x'
,
'(2 + 1)xx'
,
'(2 + 1)x
*
x'
,
'3xx'
,
'3x
*
x'
,
'3x ^ (1 + 1)'
,
'3x ^ (1 + 1)'
,
'3x ^ 2'
,
'3x ^ 2'
,
])
])
...
@@ -32,20 +32,20 @@ class TestLeidenOefenopgaveV12(TestCase):
...
@@ -32,20 +32,20 @@ class TestLeidenOefenopgaveV12(TestCase):
'-(2 * 6x + 2 * -4)(6x - 4)x'
,
'-(2 * 6x + 2 * -4)(6x - 4)x'
,
'-(12x + 2 * -4)(6x - 4)x'
,
'-(12x + 2 * -4)(6x - 4)x'
,
'-(12x - 8)(6x - 4)x'
,
'-(12x - 8)(6x - 4)x'
,
'-(12x - 8)(6xx + (-4)x)'
,
'-(12x - 8)(6x
*
x + (-4)x)'
,
'-(12x - 8)(6xx - 4x)'
,
'-(12x - 8)(6x
*
x - 4x)'
,
'-(12x - 8)(6x ^ (1 + 1) - 4x)'
,
'-(12x - 8)(6x ^ (1 + 1) - 4x)'
,
'-(12x - 8)(6x ^ 2 - 4x)'
,
'-(12x - 8)(6x ^ 2 - 4x)'
,
'-(12x * 6x ^ 2 + 12x * -4x + (-8)6x ^ 2 + (-8) * -4x)'
,
'-(12x * 6x ^ 2 + 12x * -4x + (-8)6x ^ 2 + (-8) * -4x)'
,
'-(72x x ^ 2 + 12x * -4x + (-8)6x ^ 2 + (-8) * -4x)'
,
'-(72x
*
x ^ 2 + 12x * -4x + (-8)6x ^ 2 + (-8) * -4x)'
,
'-(72x
x ^ 2 + (-48)x
x + (-8)6x ^ 2 + (-8) * -4x)'
,
'-(72x
* x ^ 2 + (-48)x *
x + (-8)6x ^ 2 + (-8) * -4x)'
,
'-(72x
x ^ 2 + (-48)x
x + (-48)x ^ 2 + (-8) * -4x)'
,
'-(72x
* x ^ 2 + (-48)x *
x + (-48)x ^ 2 + (-8) * -4x)'
,
'-(72x
x ^ 2 + (-48)x
x + (-48)x ^ 2 + (--32)x)'
,
'-(72x
* x ^ 2 + (-48)x *
x + (-48)x ^ 2 + (--32)x)'
,
'-(72x
x ^ 2 + (-48)x
x + (-48)x ^ 2 + 32x)'
,
'-(72x
* x ^ 2 + (-48)x *
x + (-48)x ^ 2 + 32x)'
,
'-(72x
x ^ 2 - 48x
x + (-48)x ^ 2 + 32x)'
,
'-(72x
* x ^ 2 - 48x *
x + (-48)x ^ 2 + 32x)'
,
'-(72x
x ^ 2 - 48x
x - 48x ^ 2 + 32x)'
,
'-(72x
* x ^ 2 - 48x *
x - 48x ^ 2 + 32x)'
,
'-(72x ^ (1 + 2) - 48xx - 48x ^ 2 + 32x)'
,
'-(72x ^ (1 + 2) - 48x
*
x - 48x ^ 2 + 32x)'
,
'-(72x ^ 3 - 48xx - 48x ^ 2 + 32x)'
,
'-(72x ^ 3 - 48x
*
x - 48x ^ 2 + 32x)'
,
'-(72x ^ 3 - 48x ^ (1 + 1) - 48x ^ 2 + 32x)'
,
'-(72x ^ 3 - 48x ^ (1 + 1) - 48x ^ 2 + 32x)'
,
'-(72x ^ 3 - 48x ^ 2 - 48x ^ 2 + 32x)'
,
'-(72x ^ 3 - 48x ^ 2 - 48x ^ 2 + 32x)'
,
'-(72x ^ 3 + (1 + 1) * -48x ^ 2 + 32x)'
,
'-(72x ^ 3 + (1 + 1) * -48x ^ 2 + 32x)'
,
...
...
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