Commit 6c8f6ecc authored by stefanow's avatar stefanow
Browse files

Merge branch 'master' of gitlab.ethz.ch:stefanow/tmcmc

parents 63b96028 58b74aff
......@@ -78,6 +78,7 @@ static std::uniform_real_distribution<numeric_t> unif_dist(0.,1.);
inline static PopMatrix prior_sample(const index_t n_samples){
PopMatrix prior(N_DIM, n_samples);
#ifdef UNIF_PRIOR
#pragma omp parallel for schedule(static)
for(index_t j = 0; j < n_samples; ++j){
for(index_t i = 0; i < N_DIM - 1; ++i){
prior(i,j) = unif_dist(GEN) * BOUND;
......@@ -86,6 +87,7 @@ inline static PopMatrix prior_sample(const index_t n_samples){
}
#else
const auto exact_solution = get_exact_solution();
#pragma omp parallel for schedule(static)
for(index_t i = 0; i < n_samples; ++i){
for (index_t j = 0; j < N_DIM-1; ++j) {
prior(j, i) = normal_prior(GEN) * exact_solution(j);
......@@ -97,7 +99,6 @@ inline static PopMatrix prior_sample(const index_t n_samples){
}
/// Returns the value of the prior pdf at theta
inline static numeric_t prior(const ThetaVector & theta){
numeric_t prior_pdf = 1.0;
const auto exact_solution = get_exact_solution();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment