Libraryless. Click here for Pure Java version (5793L/33K).
1 | static Cl<FoundInStep<Double>> runProbabilisticBinaryMaximumSearch_withFoundInStep(IF1<Double> f, DoubleRange searchRange, double featureSize, int maxResults, int maxSteps) {
|
2 | var collector = new PSCollectMostProbable<FoundInStep<Double>>(maxResults).run(); |
3 | var ps = collector.ps; |
4 | ProbabilisticBinaryMaximumSearch search = new(f, x -> {
|
5 | //print("At " + ps.currentProbability() + ": Found " + x);
|
6 | collector.add(withProbability(x.probability, new FoundInStep<Double>(ps.stepCount(), x!))); |
7 | }, searchRange); |
8 | search.featureSize = featureSize; |
9 | search.run(ps); |
10 | stepMax(collector, maxSteps); |
11 | ret collector!; |
12 | } |
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx
No comments. add comment
| Snippet ID: | #1032067 |
| Snippet name: | runProbabilisticBinaryMaximumSearch_withFoundInStep - collect & return all incremental results as FoundInStep<Double> |
| Eternal ID of this version: | #1032067/6 |
| Text MD5: | 31b91b84cd0abcb1cd402f9162cc434e |
| Transpilation MD5: | 561d9c3a1db4c6887d52d69a020905b2 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-08-17 19:37:43 |
| Source code size: | 634 bytes / 12 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 367 / 484 |
| Version history: | 5 change(s) |
| Referenced in: | [show references] |