1 | static S web_candidateWithMostConfirms(L<Lisp> facts, S pivot, L<S> candidates) { |
2 | new Best<S> best; |
3 | for i over candidates: { |
4 | S candidate = candidates.get(i); |
5 | new Web web; |
6 | web.newNode(pivot, candidate); |
7 | for (Lisp fact : facts) |
8 | web.relation(fact); |
9 | int score = web_countConfirms(web, facts); |
10 | if (score > 0) |
11 | best.put(candidate, score); |
12 | } |
13 | ret best.get(); |
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: | #1007663 |
Snippet name: | web_candidateWithMostConfirms |
Eternal ID of this version: | #1007663/1 |
Text MD5: | 9325fdadac1470b18ea2283ce9fea025 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-03-30 22:05:46 |
Source code size: | 408 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 456 / 472 |
Referenced in: | [show references] |