Skip to content
Snippets Groups Projects
Commit 4ba68232 authored by andreas's avatar andreas
Browse files

added random range generator to value util

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2689 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent 43bafdb8
No related branches found
No related tags found
No related merge requests found
...@@ -69,7 +69,16 @@ T Random() { ...@@ -69,7 +69,16 @@ T Random() {
return UniformRandom(); return UniformRandom();
} }
typedef boost::variate_generator<boost::mt19937&, boost::uniform_int<> > UniformIntGenerator;
inline
UniformIntGenerator GetUniformIntGenerator(int min, int max)
{
boost::uniform_int<> dist(min,max);
return UniformIntGenerator(RandomGenerator, dist);
}
// value to value conversion // value to value conversion
// declaration // declaration
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment