Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Matthias Mayr
limbo
Commits
979ab760
Commit
979ab760
authored
Jun 06, 2016
by
Konstantinos Chatzilygeroudis
Browse files
Fix for #113
parent
463d04e2
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
src/limbo/tools/rand_utils.hpp
0 → 100644
View file @
979ab760
This diff is collapsed.
Click to expand it.
src/limbo/tools/random_generator.hpp
View file @
979ab760
...
...
@@ -42,6 +42,7 @@
#include <random>
#include <utility>
#include <mutex>
#include <limbo/tools/rand_utils.hpp>
namespace
limbo
{
namespace
tools
{
...
...
@@ -55,7 +56,7 @@ namespace limbo {
class
RandomGenerator
{
public:
using
result_type
=
typename
D
::
result_type
;
RandomGenerator
(
result_type
min
,
result_type
max
)
:
_dist
(
min
,
max
),
_rgen
(
std
::
random_device
()
())
{}
RandomGenerator
(
result_type
min
,
result_type
max
)
:
_dist
(
min
,
max
),
_rgen
(
randutils
::
auto_seed_128
{}.
base
())
{}
result_type
rand
()
{
std
::
lock_guard
<
std
::
mutex
>
lock
(
_mutex
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment