kthohr / mcmc

A C++ library of Markov Chain Monte Carlo (MCMC) methods
https://mcmclib.readthedocs.io/en/latest/
Apache License 2.0
166 stars 45 forks source link

row vs column vector dimension mismatch in de #3

Closed Maginor closed 5 years ago

Maginor commented 5 years ago

Line 136 in de.cpp causes arma to throw a dimension mismatch exception (at least if n_vals is more than 1). The bug is fixed if I change line 134 to arma::rowvec prop_rand = arma::randu(1, n_vals)(2par_b) - par_b; // generate a vector of U[-b,b] RVs

kthohr commented 5 years ago

Thanks for reporting this (and sorry for the delay). Should be fixed now.