static <A> A bestAccordingTo(Collection<A> l, O scoreFunction) { new Best<A> best; for (A a : l) best.put(a, toDouble(callF(scoreFunction, a))); ret best.get(); }
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1006218 |
| Snippet name: | bestAccordingTo - get best element of list according to a score function |
| Eternal ID of this version: | #1006218/1 |
| Text MD5: | 86e09d47fb6e861fe81cf4ddb571fcbb |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2016-12-23 16:12:48 |
| Source code size: | 177 bytes / 6 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 673 / 711 |
| Referenced in: | [show references] |