c++11: Simplify random generation code using C++11.

* src/misc/random.cc, src/misc/random.hh (srand, drand, mrand, rrand,
barand): Simplify using <random> from C++11.
(nrand, bmrand, prand): Remove these unused functions.
* src/tgbaalgos/randomgraph.cc: Adjust the use of barand.
* configure.ac: Do not check for srand48 and drand48.
This commit is contained in:
Alexandre Duret-Lutz 2013-12-18 23:42:25 +01:00
parent 7480470760
commit c64503fb33
4 changed files with 18 additions and 147 deletions

View file

@ -149,7 +149,7 @@ namespace spot
// We want to connect each node to a number of successors between
// 1 and n. If the probability to connect to each successor is d,
// the number of connected successors follows a binomial distribution.
barand<nrand> bin(n - 1, d);
barand bin(n - 1, d);
while (!nodes_to_process.empty())
{