Libraryless. Click here for Pure Java version (2288L/15K).
1 | static <A> ItIt<A> strategyIterator(Best<A> best, Steppable strategy, O... _) { |
2 | optPar Double optimumValue; |
3 | ret iff(func { |
4 | if (optimumValue != null && eq(best.score(), optimumValue)) ret endMarker(); |
5 | A lastBest = best!; |
6 | if (strategy.step()) ret endMarker(); |
7 | ret best! == lastBest ? null : best!; |
8 | }); |
9 | } |
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1024189 |
Snippet name: | strategyIterator |
Eternal ID of this version: | #1024189/1 |
Text MD5: | 1070d5f5ed6ad6c7afdca76938e8a140 |
Transpilation MD5: | 73a29ef4ba8c1450330a037f9f9f3aa5 |
Author: | stefan |
Category: | javax / stefan's os / a.i |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-07-24 19:38:09 |
Source code size: | 331 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 220 / 298 |
Referenced in: | [show references] |