use mt19937_64 generator
parent
9f91aedd6a
commit
e01fc2da03
|
|
@ -14,8 +14,7 @@
|
||||||
* @author Alex Cunningham
|
* @author Alex Cunningham
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <boost/random/normal_distribution.hpp>
|
#include <boost/random.hpp>
|
||||||
#include <boost/random/variate_generator.hpp>
|
|
||||||
|
|
||||||
#include <gtsam/linear/Sampler.h>
|
#include <gtsam/linear/Sampler.h>
|
||||||
namespace gtsam {
|
namespace gtsam {
|
||||||
|
|
@ -51,7 +50,7 @@ Vector Sampler::sampleDiagonal(const Vector& sigmas) {
|
||||||
} else {
|
} else {
|
||||||
typedef boost::normal_distribution<double> Normal;
|
typedef boost::normal_distribution<double> Normal;
|
||||||
Normal dist(0.0, sigma);
|
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();
|
result(i) = norm();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ protected:
|
||||||
noiseModel::Diagonal::shared_ptr model_;
|
noiseModel::Diagonal::shared_ptr model_;
|
||||||
|
|
||||||
/** generator */
|
/** generator */
|
||||||
boost::minstd_rand generator_;
|
boost::mt19937_64 generator_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef boost::shared_ptr<Sampler> shared_ptr;
|
typedef boost::shared_ptr<Sampler> shared_ptr;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue