Vcsn
2.3
Be Rational
Main Page
Namespaces
Classes
Files
File List
File Members
random.cc
Go to the documentation of this file.
1
#include <
vcsn/misc/random.hh
>
2
3
namespace
vcsn
4
{
6
std::mt19937&
make_random_engine
()
7
{
8
static
auto
res
= []
9
{
10
if
(getenv(
"VCSN_SEED"
))
11
return
std::mt19937{std::mt19937::default_seed};
12
else
13
{
14
std::random_device rd;
15
return
std::mt19937{rd()};
16
}
17
}();
18
return
res
;
19
}
20
}
vcsn::make_random_engine
std::mt19937 & make_random_engine()
Generate a unique random device.
Definition:
random.cc:6
random.hh
vcsn::res
return res
Definition:
multiply.hh:398
vcsn
Definition:
a-star.hh:8
lib
vcsn
misc
random.cc
Generated by
1.8.10