Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Type of get_rand_endgine To get_rand_engine #29

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/10-likelihood-free-mcmc/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down
2 changes: 1 addition & 1 deletion include/epiworld/math/lfmcmc/lfmcmc-bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion include/epiworld/math/lfmcmc/lfmcmc-meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ inline void LFMCMC<TData>::set_rand_gamma(epiworld_double alpha, epiworld_double
}

template<typename TData>
inline std::mt19937 & LFMCMC<TData>::get_rand_endgine()
inline std::mt19937 & LFMCMC<TData>::get_rand_engine()
{
return *engine;
}
Expand Down
2 changes: 1 addition & 1 deletion include/epiworld/model-bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion include/epiworld/model-meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ inline void Model<TSeq>::set_backup()
// }

template<typename TSeq>
inline std::mt19937 & Model<TSeq>::get_rand_endgine()
inline std::mt19937 & Model<TSeq>::get_rand_engine()
{
return engine;
}
Expand Down
2 changes: 1 addition & 1 deletion include/epiworld/models/surveillance.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ inline ModelSURV<TSeq>::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;

Expand Down
4 changes: 2 additions & 2 deletions include/epiworld/randgraph.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down