add global PRNG to utilities.h
parent
d4c9c68b58
commit
bc7646f82f
|
@ -1,11 +1,18 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
#include <gtsam/dllexport.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <random>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
/**
|
||||
* @brief Global default pseudo-random number generator object.
|
||||
* In wrappers we can access std::mt19937_64 via gtsam.MT19937
|
||||
*/
|
||||
static std::mt19937_64 kRandomNumberGenerator(42);
|
||||
|
||||
namespace gtsam {
|
||||
/**
|
||||
* For Python __str__().
|
||||
|
@ -28,7 +35,7 @@ private:
|
|||
std::streambuf* coutBuffer_;
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace gtsam
|
||||
|
||||
namespace gtsam {
|
||||
// Adapted from https://stackoverflow.com/a/32223343/9151520
|
||||
|
|
Loading…
Reference in New Issue