-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c86b9e2
commit bb462bc
Showing
8 changed files
with
129 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ equation | |
end Test2; | ||
*/ | ||
|
||
N = 10 | ||
N = 100000 | ||
|
||
F1 = N-2 | ||
F2 = N-2+F1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ equation | |
end Test3; | ||
*/ | ||
|
||
N = 1000 | ||
N = 10 | ||
|
||
F1 = N-2 | ||
F2 = N-2+F1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// Topological sort test, with a simple recursion | ||
|
||
N = 10 | ||
N = 10000 | ||
|
||
V1 = 1 | ||
V2 = N-1+V1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// Topological sort test, with a simple recursion, and a self recursion on the right | ||
|
||
N = 100000 | ||
|
||
V1 = 1 | ||
V2 = N-1+V1 | ||
V3 = N+V2 | ||
|
||
E1 = 1 | ||
E2 = N-1+E1 | ||
E3 = N-1+E2 | ||
E4 = N-1+E3 | ||
|
||
off3b = N-1 | ||
off4b = r(V3, 1)-E4-1 | ||
|
||
off1d = N | ||
off2d = N-1 | ||
off3d = 1 | ||
off4d = r(V3, 1)-E4 | ||
|
||
V %= {[1:1:V1], [V1+1:1:V2], [V2+1:1:V3]}; | ||
Vmap %= <<{[1:1:V1]} -> 0*x+1, {[V1+1:1:V2]} -> 0*x+2, {[V2+1:1:V3]} -> 0*x+3>>; | ||
mapB %= <<{[1:1:E1]} -> 1*x+0, {[E1+1:1:E2]} -> 1*x+off2d, {[E2+1:1:E3]} -> 1*x-off3b | ||
, {[E3+1:1:E4]} -> 1*x+off4b>>; | ||
mapD %= <<{[1:1:E1]} -> 1*x+off1d, {[E1+1:1:E2]} -> 1*x+0, {[E2+1:1:E3]} -> 1*x+off3d | ||
, {[E3+1:1:E4]} -> 1*x+off4d>>; | ||
Emap %= <<{[1:1:E1]} -> 0*x+1, {[E1+1:1:E2], [E2+1:1:E3]} -> 0*x+2, {[E3+1:1:E4]} -> 0*x+3>>; | ||
|
||
sort( | ||
V %= {[1:1:V1], [V1+1:1:V2], [V2+1:1:V3]}; | ||
Vmap %= <<{[1:1:V1]} -> 0*x+1, {[V1+1:1:V2]} -> 0*x+2, {[V2+1:1:V3]} -> 0*x+3>>; | ||
mapB %= <<{[1:1:E1]} -> 1*x+0, {[E1+1:1:E2]} -> 1*x+off2d, {[E2+1:1:E3]} -> 1*x-off3b | ||
, {[E3+1:1:E4]} -> 1*x+off4b>>; | ||
mapD %= <<{[1:1:E1]} -> 1*x+off1d, {[E1+1:1:E2]} -> 1*x+0, {[E2+1:1:E3]} -> 1*x+off3d | ||
, {[E3+1:1:E4]} -> 1*x+off4d>>; | ||
Emap %= <<{[1:1:E1]} -> 0*x+1, {[E1+1:1:E2], [E2+1:1:E3]} -> 0*x+2, {[E3+1:1:E4]} -> 0*x+3>>; | ||
) |