1 | static S webToString(Web web) {
|
2 | new L<S> out; |
3 | new Map<WebNode, Int> index; |
4 | for (int i = 0; i < l(web.nodes); i++) {
|
5 | out.add("Node " + (i+1) + ": " + web.nodes.get(i));
|
6 | index.put(web.nodes.get(i), i+1); |
7 | } |
8 | |
9 | for (Pair<WebNode> p : web_relations(web)) |
10 | out.add(index.get(p.a) + " -> " + index.get(p.b) + " = " + web.getRelation(p)); |
11 | |
12 | ret fromLines(out); |
13 | } |
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: | #1007694 |
| Snippet name: | webToString [multiple lines] |
| Eternal ID of this version: | #1007694/8 |
| Text MD5: | 1a447bf7eb5e0a81af278e429f1fa248 |
| Author: | stefan |
| Category: | javax / a.i. |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-11-26 16:19:39 |
| Source code size: | 392 bytes / 13 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 923 / 919 |
| Version history: | 7 change(s) |
| Referenced in: | [show references] |