static S webToString(Web web) { new L<S> out; new Map<WebNode, Int> index; for (int i = 0; i < l(web.nodes); i++) { out.add("Node " + (i+1) + ": " + web.nodes.get(i)); index.put(web.nodes.get(i), i+1); } for (Pair<WebNode> p : web_relations(web)) out.add(index.get(p.a) + " -> " + index.get(p.b) + " = " + web.getRelation(p)); ret fromLines(out); }
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: | 691 / 682 |
Version history: | 7 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |