added fractions and RNG::trial

This commit is contained in:
2024-07-11 17:28:04 -04:00
parent 6e822ba60a
commit ae5cd1e0c6
6 changed files with 82 additions and 0 deletions

View File

@ -5,6 +5,8 @@
#include <stdlib.h>
#include <vector>
#include "fraction.h"
// Technically, you should ONLY define one rng for the entire program
// IMPORTANT: pass all RNG objects as references
class RNG final {
@ -24,6 +26,8 @@ public:
unsigned int get_init_seed() const;
int get_curr_rand_num() const;
bool trial(fraction &psuccess);
template<class T> T &get_rand_in_vector(const std::vector<T> &vec);
};