Skip to content

Commit

Permalink
src/simreads.cpp: swapping out whatever rng was used for the mt19937
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewdavidsmith committed Oct 27, 2024
1 parent 4c14a97 commit 67c805d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/simreads.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,15 @@ namespace simreads_random {
// implementations of rand() on different OS meant that even with
// the same seed, the results could be different. This meant testing
// didn't work.

std::random_device rd;
std::mt19937 e;
bool initialized = false;
std::default_random_engine e;
std::uniform_real_distribution<double> dr;
std::uniform_int_distribution<uint64_t> di;
void
initialize(const size_t the_seed) {
e = std::default_random_engine(the_seed);
initialize([[maybe_unused]] const size_t the_seed) {
e = std::mt19937(the_seed);
initialized = true;
}

Expand Down

0 comments on commit 67c805d

Please sign in to comment.