static Collection<WebNode> web_transitiveForwardRelated(WebNode node) { new HashSet<WebNode> seen; new HashSet<WebNode> nu; nu.add(node); while (nempty(nu)) { WebNode n = first(nu); nu.remove(n); seen.add(n); for (WebNode x : web_forwardRelated(n)) if (!seen.contains(x)) nu.add(x); } ret seen; }
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: | 510 / 531 |
Version history: | 1 change(s) |
Referenced in: | [show references] |