1 | static Collection<WebNode> web_transitiveForwardRelated(WebNode node) { |
2 | new HashSet<WebNode> seen; |
3 | new HashSet<WebNode> nu; |
4 | nu.add(node); |
5 | while (nempty(nu)) { |
6 | WebNode n = first(nu); |
7 | nu.remove(n); |
8 | seen.add(n); |
9 | for (WebNode x : web_forwardRelated(n)) |
10 | if (!seen.contains(x)) |
11 | nu.add(x); |
12 | } |
13 | ret seen; |
14 | } |
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: | #1010272 |
Snippet name: | web_transitiveForwardRelated - get web starting from a node |
Eternal ID of this version: | #1010272/2 |
Text MD5: | 99f6d4a4c0b4fddf98a06bb9026f391f |
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 23:50:08 |
Source code size: | 351 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 511 / 532 |
Version history: | 1 change(s) |
Referenced in: | [show references] |