Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
trs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Taddeüs Kroes
trs
Commits
aed5ec18
Commit
aed5ec18
authored
12 years ago
by
Taddeüs Kroes
Browse files
Options
Downloads
Patches
Plain Diff
Multiplication sign is not omitted anymore for multiplication of equal identifiers
parent
3e5a2ac4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
external/graph_drawing
+1
-1
1 addition, 1 deletion
external/graph_drawing
tests/test_leiden_oefenopgave.py
+42
-42
42 additions, 42 deletions
tests/test_leiden_oefenopgave.py
tests/test_leiden_oefenopgave_v12.py
+13
-13
13 additions, 13 deletions
tests/test_leiden_oefenopgave_v12.py
with
56 additions
and
56 deletions
graph_drawing
@
c8ecf708
Subproject commit
0e6c5e55add6e924a4201a2132457e9b3c7e26d0
Subproject commit
c8ecf7081c6b944228a208617ad539e67091ef78
This diff is collapsed.
Click to expand it.
tests/test_leiden_oefenopgave.py
+
42
−
42
View file @
aed5ec18
...
...
@@ -42,23 +42,23 @@ class TestLeidenOefenopgave(TestCase):
'
(x + 1) ^ 3
'
,
'
(x + 1)(x + 1) ^ 2
'
,
'
(x + 1)(x + 1)(x + 1)
'
,
'
(xx + x * 1 + 1x + 1 * 1)(x + 1)
'
,
'
(xx + x + 1x + 1 * 1)(x + 1)
'
,
'
(xx + x + x + 1 * 1)(x + 1)
'
,
'
(xx + x + x + 1)(x + 1)
'
,
'
(xx + (1 + 1)x + 1)(x + 1)
'
,
'
(xx + 2x + 1)(x + 1)
'
,
'
(x
*
x + x * 1 + 1x + 1 * 1)(x + 1)
'
,
'
(x
*
x + x + 1x + 1 * 1)(x + 1)
'
,
'
(x
*
x + x + x + 1 * 1)(x + 1)
'
,
'
(x
*
x + x + x + 1)(x + 1)
'
,
'
(x
*
x + (1 + 1)x + 1)(x + 1)
'
,
'
(x
*
x + 2x + 1)(x + 1)
'
,
'
(x ^ (1 + 1) + 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 + 2xx + 2x * 1 + 1x + 1 * 1
'
,
'
x ^ 2 * x + x ^ 2 + 2xx + 2x + 1x + 1 * 1
'
,
'
x ^ 2 * x + x ^ 2 + 2xx + 2x + x + 1 * 1
'
,
'
x ^ 2 * x + x ^ 2 + 2xx + 2x + x + 1
'
,
'
x ^ 2 * x + x ^ 2 + 2xx + (2 + 1)x + 1
'
,
'
x ^ 2 * x + x ^ 2 + 2xx + 3x + 1
'
,
'
x ^ (2 + 1) + x ^ 2 + 2xx + 3x + 1
'
,
'
x ^ 3 + x ^ 2 + 2xx + 3x + 1
'
,
'
x ^ 2 * x + x ^ 2 * 1 + 2x
*
x + 2x * 1 + 1x + 1 * 1
'
,
'
x ^ 2 * x + x ^ 2 + 2x
*
x + 2x * 1 + 1x + 1 * 1
'
,
'
x ^ 2 * x + x ^ 2 + 2x
*
x + 2x + 1x + 1 * 1
'
,
'
x ^ 2 * x + x ^ 2 + 2x
*
x + 2x + x + 1 * 1
'
,
'
x ^ 2 * x + x ^ 2 + 2x
*
x + 2x + x + 1
'
,
'
x ^ 2 * x + x ^ 2 + 2x
*
x + (2 + 1)x + 1
'
,
'
x ^ 2 * x + x ^ 2 + 2x
*
x + 3x + 1
'
,
'
x ^ (2 + 1) + x ^ 2 + 2x
*
x + 3x + 1
'
,
'
x ^ 3 + x ^ 2 + 2x
*
x + 3x + 1
'
,
'
x ^ 3 + x ^ 2 + 2x ^ (1 + 1) + 3x + 1
'
,
'
x ^ 3 + x ^ 2 + 2x ^ 2 + 3x + 1
'
,
'
x ^ 3 + (1 + 2)x ^ 2 + 3x + 1
'
,
...
...
@@ -69,12 +69,12 @@ class TestLeidenOefenopgave(TestCase):
self
.
assertRewrite
([
'
(x + 1) ^ 2
'
,
'
(x + 1)(x + 1)
'
,
'
xx + x * 1 + 1x + 1 * 1
'
,
'
xx + x + 1x + 1 * 1
'
,
'
xx + x + x + 1 * 1
'
,
'
xx + x + x + 1
'
,
'
xx + (1 + 1)x + 1
'
,
'
xx + 2x + 1
'
,
'
x
*
x + x * 1 + 1x + 1 * 1
'
,
'
x
*
x + x + 1x + 1 * 1
'
,
'
x
*
x + x + x + 1 * 1
'
,
'
x
*
x + x + x + 1
'
,
'
x
*
x + (1 + 1)x + 1
'
,
'
x
*
x + 2x + 1
'
,
'
x ^ (1 + 1) + 2x + 1
'
,
'
x ^ 2 + 2x + 1
'
,
])
...
...
@@ -83,16 +83,16 @@ class TestLeidenOefenopgave(TestCase):
self
.
assertRewrite
([
'
(x - 1) ^ 2
'
,
'
(x - 1)(x - 1)
'
,
'
xx + x * -1 + (-1)x + (-1) * -1
'
,
'
xx + x * -1 + (-1)x - -1
'
,
'
xx + x * -1 + (-1)x + 1
'
,
'
xx - x * 1 + (-1)x + 1
'
,
'
xx - x + (-1)x + 1
'
,
'
xx - x - 1x + 1
'
,
'
xx - x - x + 1
'
,
'
xx + (1 + 1) * -x + 1
'
,
'
xx + 2 * -x + 1
'
,
'
xx - 2x + 1
'
,
'
x
*
x + x * -1 + (-1)x + (-1) * -1
'
,
'
x
*
x + x * -1 + (-1)x - -1
'
,
'
x
*
x + x * -1 + (-1)x + 1
'
,
'
x
*
x - x * 1 + (-1)x + 1
'
,
'
x
*
x - x + (-1)x + 1
'
,
'
x
*
x - x - 1x + 1
'
,
'
x
*
x - x - x + 1
'
,
'
x
*
x + (1 + 1) * -x + 1
'
,
'
x
*
x + 2 * -x + 1
'
,
'
x
*
x - 2x + 1
'
,
'
x ^ (1 + 1) - 2x + 1
'
,
'
x ^ 2 - 2x + 1
'
,
])
...
...
@@ -134,8 +134,8 @@ class TestLeidenOefenopgave(TestCase):
def
test_1_5
(
self
):
self
.
assertRewrite
([
'
(2x + x)x
'
,
'
(2 + 1)xx
'
,
'
3xx
'
,
'
(2 + 1)x
*
x
'
,
'
3x
*
x
'
,
'
3x ^ (1 + 1)
'
,
'
3x ^ 2
'
,
])
...
...
@@ -146,15 +146,15 @@ class TestLeidenOefenopgave(TestCase):
'
-(4x + 5)(5 - 4x)
'
,
'
-(4x * 5 + 4x * -4x + 5 * 5 + 5 * -4x)
'
,
'
-(20x + 4x * -4x + 5 * 5 + 5 * -4x)
'
,
'
-(20x + (-16)xx + 5 * 5 + 5 * -4x)
'
,
'
-(20x + (-16)xx + 25 + 5 * -4x)
'
,
'
-(20x + (-16)xx + 25 + (-20)x)
'
,
'
-(20x - 16xx + 25 + (-20)x)
'
,
'
-(20x - 16xx + 25 - 20x)
'
,
'
-((1 - 1)20x - 16xx + 25)
'
,
'
-(0 * 20x - 16xx + 25)
'
,
'
-(0 - 16xx + 25)
'
,
'
-(-16xx + 25)
'
,
'
-(20x + (-16)x
*
x + 5 * 5 + 5 * -4x)
'
,
'
-(20x + (-16)x
*
x + 25 + 5 * -4x)
'
,
'
-(20x + (-16)x
*
x + 25 + (-20)x)
'
,
'
-(20x - 16x
*
x + 25 + (-20)x)
'
,
'
-(20x - 16x
*
x + 25 - 20x)
'
,
'
-((1 - 1)20x - 16x
*
x + 25)
'
,
'
-(0 * 20x - 16x
*
x + 25)
'
,
'
-(0 - 16x
*
x + 25)
'
,
'
-(-16x
*
x + 25)
'
,
'
-(-16x ^ (1 + 1) + 25)
'
,
'
-(-16x ^ 2 + 25)
'
,
'
--16x ^ 2 - 25
'
,
...
...
This diff is collapsed.
Click to expand it.
tests/test_leiden_oefenopgave_v12.py
+
13
−
13
View file @
aed5ec18
...
...
@@ -19,8 +19,8 @@ class TestLeidenOefenopgaveV12(TestCase):
def
test_1_d
(
self
):
self
.
assertRewrite
([
'
(2x + x)x
'
,
'
(2 + 1)xx
'
,
'
3xx
'
,
'
(2 + 1)x
*
x
'
,
'
3x
*
x
'
,
'
3x ^ (1 + 1)
'
,
'
3x ^ 2
'
,
])
...
...
@@ -32,20 +32,20 @@ class TestLeidenOefenopgaveV12(TestCase):
'
-(2 * 6x + 2 * -4)(6x - 4)x
'
,
'
-(12x + 2 * -4)(6x - 4)x
'
,
'
-(12x - 8)(6x - 4)x
'
,
'
-(12x - 8)(6xx + (-4)x)
'
,
'
-(12x - 8)(6xx - 4x)
'
,
'
-(12x - 8)(6x
*
x + (-4)x)
'
,
'
-(12x - 8)(6x
*
x - 4x)
'
,
'
-(12x - 8)(6x ^ (1 + 1) - 4x)
'
,
'
-(12x - 8)(6x ^ 2 - 4x)
'
,
'
-(12x * 6x ^ 2 + 12x * -4x + (-8)6x ^ 2 + (-8) * -4x)
'
,
'
-(72x x ^ 2 + 12x * -4x + (-8)6x ^ 2 + (-8) * -4x)
'
,
'
-(72x x ^ 2 + (-48)xx + (-8)6x ^ 2 + (-8) * -4x)
'
,
'
-(72x x ^ 2 + (-48)xx + (-48)x ^ 2 + (-8) * -4x)
'
,
'
-(72x x ^ 2 + (-48)xx + (-48)x ^ 2 + (--32)x)
'
,
'
-(72x x ^ 2 + (-48)xx + (-48)x ^ 2 + 32x)
'
,
'
-(72x x ^ 2 - 48xx + (-48)x ^ 2 + 32x)
'
,
'
-(72x x ^ 2 - 48xx - 48x ^ 2 + 32x)
'
,
'
-(72x ^ (1 + 2) - 48xx - 48x ^ 2 + 32x)
'
,
'
-(72x ^ 3 - 48xx - 48x ^ 2 + 32x)
'
,
'
-(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 + (-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 + 32x)
'
,
'
-(72x
*
x ^ 2 - 48x
*
x + (-48)x ^ 2 + 32x)
'
,
'
-(72x
*
x ^ 2 - 48x
*
x - 48x ^ 2 + 32x)
'
,
'
-(72x ^ (1 + 2) - 48x
*
x - 48x ^ 2 + 32x)
'
,
'
-(72x ^ 3 - 48x
*
x - 48x ^ 2 + 32x)
'
,
'
-(72x ^ 3 - 48x ^ (1 + 1) - 48x ^ 2 + 32x)
'
,
'
-(72x ^ 3 - 48x ^ 2 - 48x ^ 2 + 32x)
'
,
'
-(72x ^ 3 + (1 + 1) * -48x ^ 2 + 32x)
'
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment