use mt19937_64 generator

release/4.3a0
Duy-Nguyen Ta 2015-09-10 22:59:44 -04:00
parent 9f91aedd6a
commit e01fc2da03
2 changed files with 3 additions and 4 deletions

View File

@ -14,8 +14,7 @@
* @author Alex Cunningham
*/
#include <boost/random/normal_distribution.hpp>
#include <boost/random/variate_generator.hpp>
#include <boost/random.hpp>
#include <gtsam/linear/Sampler.h>
namespace gtsam {
@ -51,7 +50,7 @@ Vector Sampler::sampleDiagonal(const Vector& sigmas) {
} else {
typedef boost::normal_distribution<double> Normal;
Normal dist(0.0, sigma);
boost::variate_generator<boost::minstd_rand&, Normal> norm(generator_, dist);
boost::variate_generator<boost::mt19937_64&, Normal> norm(generator_, dist);
result(i) = norm();
}
}

View File

@ -37,7 +37,7 @@ protected:
noiseModel::Diagonal::shared_ptr model_;
/** generator */
boost::minstd_rand generator_;
boost::mt19937_64 generator_;
public:
typedef boost::shared_ptr<Sampler> shared_ptr;