| 10 | std::unique_ptr<std::mt19937_64> OsiRng; |
| 11 | |
| 12 | bool RandomReal(OsiArgumentDesc & args) |
| 13 | { |
| 14 | auto min = args[0].Float; |
| 15 | auto max = args[1].Float; |
| 16 | |
| 17 | if (!OsiRng) { |
| 18 | OsiRng = std::make_unique<std::mt19937_64>(); |
| 19 | time_t tm; |
| 20 | OsiRng->seed(time(&tm)); |
| 21 | } |
| 22 | |
| 23 | std::uniform_real_distribution<float> dist(min, max); |
| 24 | args[2].Float = dist(*OsiRng); |
| 25 | return true; |
| 26 | } |
| 27 | |
| 28 | bool Sin(OsiArgumentDesc & args) |
| 29 | { |
nothing calls this directly
no outgoing calls
no test coverage detected