From c292da13c1d9e2c29b38c8e962eb35ad3b98c532 Mon Sep 17 00:00:00 2001 From: IsaccBarker Date: Sat, 26 Oct 2024 15:50:29 -0600 Subject: [PATCH] [typo] `get_rand_endgine` -> `get_rand_engine` --- examples/10-likelihood-free-mcmc/main.cpp | 2 +- include/epiworld/math/lfmcmc/lfmcmc-bones.hpp | 2 +- include/epiworld/math/lfmcmc/lfmcmc-meat.hpp | 2 +- include/epiworld/model-bones.hpp | 2 +- include/epiworld/model-meat.hpp | 2 +- include/epiworld/models/surveillance.hpp | 2 +- include/epiworld/randgraph.hpp | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/10-likelihood-free-mcmc/main.cpp b/examples/10-likelihood-free-mcmc/main.cpp index a5d55c4a5..acd9e3272 100644 --- a/examples/10-likelihood-free-mcmc/main.cpp +++ b/examples/10-likelihood-free-mcmc/main.cpp @@ -81,7 +81,7 @@ int main() model.get_db().get_today_total(nullptr, &obs_dat); lfmcmc.set_observed_data(obs_dat); - lfmcmc.set_rand_engine(model.get_rand_endgine()); + lfmcmc.set_rand_engine(model.get_rand_engine()); std::vector< epiworld_double > par0 = {.5, .5}; diff --git a/include/epiworld/math/lfmcmc/lfmcmc-bones.hpp b/include/epiworld/math/lfmcmc/lfmcmc-bones.hpp index 6c494b95f..4599f8f57 100755 --- a/include/epiworld/math/lfmcmc/lfmcmc-bones.hpp +++ b/include/epiworld/math/lfmcmc/lfmcmc-bones.hpp @@ -207,7 +207,7 @@ class LFMCMC { */ ///@{ void set_rand_engine(std::mt19937 & eng); - std::mt19937 & get_rand_endgine(); + std::mt19937 & get_rand_engine(); void seed(epiworld_fast_uint s); void set_rand_gamma(epiworld_double alpha, epiworld_double beta); epiworld_double runif(); diff --git a/include/epiworld/math/lfmcmc/lfmcmc-meat.hpp b/include/epiworld/math/lfmcmc/lfmcmc-meat.hpp index 688f4fd03..3f48933ae 100755 --- a/include/epiworld/math/lfmcmc/lfmcmc-meat.hpp +++ b/include/epiworld/math/lfmcmc/lfmcmc-meat.hpp @@ -390,7 +390,7 @@ inline void LFMCMC::set_rand_gamma(epiworld_double alpha, epiworld_double } template -inline std::mt19937 & LFMCMC::get_rand_endgine() +inline std::mt19937 & LFMCMC::get_rand_engine() { return *engine; } diff --git a/include/epiworld/model-bones.hpp b/include/epiworld/model-bones.hpp index cf454d463..73b94faf0 100644 --- a/include/epiworld/model-bones.hpp +++ b/include/epiworld/model-bones.hpp @@ -287,7 +287,7 @@ class Model { */ ///@{ void set_rand_engine(std::mt19937 & eng); - std::mt19937 & get_rand_endgine(); + std::mt19937 & get_rand_engine(); void seed(size_t s); void set_rand_norm(epiworld_double mean, epiworld_double sd); void set_rand_unif(epiworld_double a, epiworld_double b); diff --git a/include/epiworld/model-meat.hpp b/include/epiworld/model-meat.hpp index f04f79dac..eeb985302 100644 --- a/include/epiworld/model-meat.hpp +++ b/include/epiworld/model-meat.hpp @@ -820,7 +820,7 @@ inline void Model::set_backup() // } template -inline std::mt19937 & Model::get_rand_endgine() +inline std::mt19937 & Model::get_rand_engine() { return engine; } diff --git a/include/epiworld/models/surveillance.hpp b/include/epiworld/models/surveillance.hpp index 6dca7e4ea..37403b15e 100644 --- a/include/epiworld/models/surveillance.hpp +++ b/include/epiworld/models/surveillance.hpp @@ -227,7 +227,7 @@ inline ModelSURV::ModelSURV( // How many will we find std::binomial_distribution<> bdist(m->size(), m->par("Surveilance prob.")); - int nsampled = bdist(m->get_rand_endgine()); + int nsampled = bdist(m->get_rand_engine()); int to_go = nsampled + 1; diff --git a/include/epiworld/randgraph.hpp b/include/epiworld/randgraph.hpp index cdf827287..aeac3b402 100644 --- a/include/epiworld/randgraph.hpp +++ b/include/epiworld/randgraph.hpp @@ -299,7 +299,7 @@ inline AdjList rgraph_bernoulli( p ); - epiworld_fast_uint m = d(model.get_rand_endgine()); + epiworld_fast_uint m = d(model.get_rand_engine()); source.resize(m); target.resize(m); @@ -353,7 +353,7 @@ inline AdjList rgraph_bernoulli2( // elements sampled. If n * n, then each diag element has // 1/(n^2) chance of sampling - epiworld_fast_uint m = d(model.get_rand_endgine()); + epiworld_fast_uint m = d(model.get_rand_engine()); source.resize(m); target.resize(m);