1 | static LL<WebTree> webTrees_walkInParallel(L<WebTree> trees) { |
2 | new LL<WebTree> out; |
3 | webTrees_walkInParallel_impl(trees, out); |
4 | ret out; |
5 | } |
6 | |
7 | static void webTrees_walkInParallel_impl(L<WebTree> trees, LL<WebTree> out) { |
8 | out.add(trees); |
9 | trees = cloneList(trees); |
10 | int n = 0; |
11 | for (WebTree t : trees) if (t != null) n = max(n, l(t.children)); |
12 | for i to n: { |
13 | new L<WebTree> children; |
14 | for (WebTree t : trees) |
15 | children.add(t == null ? null : pairB(get(t.children, i))); |
16 | webTrees_walkInParallel_impl(children, out); |
17 | } |
18 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1010252 |
Snippet name: | webTrees_walkInParallel - rough |
Eternal ID of this version: | #1010252/7 |
Text MD5: | 285e78c83df612f271806a9f1c222a8d |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-09-07 18:50:02 |
Source code size: | 559 bytes / 18 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 571 / 562 |
Version history: | 6 change(s) |
Referenced in: | [show references] |