You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When put the example into a cpp file, then compiles using "clang++ -I.. -Wall -O2 -std=c++11 test1.cpp -o test1 -larmadillo", it gives:
test1.cpp:59:11: error: no matching constructor for initialization of 'cppbugs::MCModel'
MCModel m(model);
^ ~~~~~
../cppbugs/mcmc.model.hpp:38:9: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from
'std::function<void ()>' to 'const cppbugs::MCModel' for 1st argument
class MCModel {
^
../cppbugs/mcmc.model.hpp:55:5: note: candidate constructor not viable: no known conversion from 'std::function<void ()>' to 'cppbugs::RngBase &'
for 1st argument
MCModel(RngBase& rng): rng_(rng), accepted_(0), rejected_(0), logp_value_(-std::numeric_limits::infinity()), old_logp_value_(-s...
^
1 error generated.
The text was updated successfully, but these errors were encountered:
Unfortunately the README file didn't keep up with the changing codebase, I've updated it to display the eight schools model, which is much less complicated than the herd model. Just the core of the model is displayed, so I wouldn't rely on the README to cut/paste the model. Just grab the full version from the 'test' folder where you will also find the other examples. I made a few changes to bring the code up to date with the most recent armadillo I have (7.600.2), so you should be in good shape there.
As much as I liked developing CppBugs, I suggest you check out stan. CppBugs is a very fast random walk sampler, but stan takes a smarter approach to sampling, and I'm in the process of migrating my models.
When put the example into a cpp file, then compiles using "clang++ -I.. -Wall -O2 -std=c++11 test1.cpp -o test1 -larmadillo", it gives:
test1.cpp:59:11: error: no matching constructor for initialization of 'cppbugs::MCModel'
MCModel m(model);
^ ~~~~~
../cppbugs/mcmc.model.hpp:38:9: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from
'std::function<void ()>' to 'const cppbugs::MCModel' for 1st argument
class MCModel {
^
../cppbugs/mcmc.model.hpp:55:5: note: candidate constructor not viable: no known conversion from 'std::function<void ()>' to 'cppbugs::RngBase &'
for 1st argument
MCModel(RngBase& rng): rng_(rng), accepted_(0), rejected_(0), logp_value_(-std::numeric_limits::infinity()), old_logp_value_(-s...
^
1 error generated.
The text was updated successfully, but these errors were encountered: