Libraryless. Click here for Pure Java version (2318L/15K).
1 | static <A> DynamicTopTen<A> ai_topTenOfRandomThings_nAttempts(long n, IF0<A> maker, IF1<A, Double> scoringFunction) {
|
2 | new DynamicTopTen<A> topTen; |
3 | for ping (long i = 0; i < n; i++) {
|
4 | A a = maker!; |
5 | double score = scoringFunction.get(a); |
6 | topTen.put(a, score); |
7 | } |
8 | ret topTen; |
9 | } |
Began life as a copy of #1027473
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1027478 |
| Snippet name: | ai_topTenOfRandomThings_nAttempts |
| Eternal ID of this version: | #1027478/3 |
| Text MD5: | fa128e881b04dc59f58e8bbdf69cb18c |
| Transpilation MD5: | 6814f76647d386f45cf062bcf9b6f2b8 |
| Author: | stefan |
| Category: | javax / a.i. |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-03-22 14:19:10 |
| Source code size: | 301 bytes / 9 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 378 / 502 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |