Libraryless. Click here for Pure Java version (15024L/97K).
1 | static int conceptGraphSize(Concept c) { |
2 | new IdentityHashMap seen; |
3 | conceptGraphSize_impl(c, seen); |
4 | ret l(seen); |
5 | } |
6 | |
7 | static void conceptGraphSize_impl(Concept c, IdentityHashMap<Concept, Concept> seen) { |
8 | if (c == null || seen.containsKey(c)) ret; |
9 | seen.put(c, c); |
10 | for (Concept.Ref ref : c._refs()) |
11 | conceptGraphSize_impl(ref!, seen); |
12 | } |
Began life as a copy of #1005490
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1005509 |
Snippet name: | conceptGraphSize - get number of concepts in graph |
Eternal ID of this version: | #1005509/2 |
Text MD5: | 722289d6cdc54d8f92097abbb7fc621e |
Transpilation MD5: | 86dbbab8e274a88f5a4ad81fbe905bf6 |
Author: | stefan |
Category: | javax / concepts |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-05-12 23:29:39 |
Source code size: | 360 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 455 / 525 |
Version history: | 1 change(s) |
Referenced in: | [show references] |