| 44 | } |
| 45 | |
| 46 | struct random_normal_distribution * init_random_normal_distribution( |
| 47 | int seed, float mean, float std, float min, float max |
| 48 | ) { |
| 49 | struct random_normal_distribution * rnd = (struct random_normal_distribution *) malloc(sizeof(struct random_normal_distribution)); |
| 50 | rnd->gen = std::mt19937(seed); |
| 51 | rnd->rd = std::normal_distribution<float>{mean, std}; |
| 52 | rnd->min = min; |
| 53 | rnd->max = max; |
| 54 | return rnd; |
| 55 | } |
| 56 | |
| 57 | struct random_uniform_distribution * init_random_uniform_distribution(int seed, float min, float max) { |
| 58 | struct random_uniform_distribution * rnd = (struct random_uniform_distribution *) malloc(sizeof(struct random_uniform_distribution)); |
no outgoing calls
no test coverage detected