Vcsn
2.4
Be Rational
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
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
Definition:
a-star.hh:8
vcsn::res
return res
Definition:
multiply.hh:398
vcsn::make_random_engine
std::mt19937 & make_random_engine()
Generate a unique random device.
Definition:
random.cc:6
random.hh
lib
vcsn
misc
random.cc
Generated by
1.8.8