Libraryless. Click here for Pure Java version (2318L/15K).
static <A> DynamicTopTen<A> ai_topTenOfRandomThings_nAttempts(long n, IF0<A> maker, IF1<A, Double> scoringFunction) { new DynamicTopTen<A> topTen; for ping (long i = 0; i < n; i++) { A a = maker!; double score = scoringFunction.get(a); topTen.put(a, score); } ret topTen; }
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: | 376 / 499 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |