fix MarsenneTwisterURBG class

This commit is contained in:
alemuntoni 2021-08-23 17:26:28 +02:00
parent afd5c72a93
commit e3731ec7f5
1 changed files with 3 additions and 3 deletions

View File

@ -506,9 +506,9 @@ class MarsenneTwisterURBG
{
public:
typedef unsigned int result_type;
MarsenneTwisterURBG(result_type max) : _max(max) {}
result_type min() const {return 0;}
result_type max() const {return _max;}
MarsenneTwisterURBG(result_type max){_max = max;}
static result_type min() {return 0;}
static result_type max() {return std::numeric_limits<result_type>::max();}
result_type operator()() {return SamplingRandomGenerator().generate(_max);}
private:
result_type _max;