X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b9625f82f86db0674e911887addce45dca31b57f..bfffef69e1b0554d13eec920f1a32f75b49ceac6:/include/xbt/random.hpp diff --git a/include/xbt/random.hpp b/include/xbt/random.hpp index 7d4e4ef30b..a5c4c7906f 100644 --- a/include/xbt/random.hpp +++ b/include/xbt/random.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2019-2020. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2019-2023. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -12,9 +12,7 @@ #include #include -namespace simgrid { -namespace xbt { -namespace random { +namespace simgrid::xbt::random { /** A random number generator. * @@ -85,8 +83,7 @@ public: */ class XBT_PUBLIC StdRandom : public Random { public: - StdRandom() = default; - explicit StdRandom(int seed) : Random(seed) {} + using Random::Random; int uniform_int(int min, int max) override; double uniform_real(double min, double max) override; @@ -100,8 +97,7 @@ public: */ class XBT_PUBLIC XbtRandom : public Random { public: - XbtRandom() = default; - explicit XbtRandom(int seed) : Random(seed) {} + using Random::Random; int uniform_int(int min, int max) override; double uniform_real(double min, double max) override; @@ -164,8 +160,6 @@ double exponential(double lambda); * @param sd Standard deviation of the normal distribution */ double normal(double mean, double sd); -} // namespace random -} // namespace xbt -} // namespace simgrid +} // namespace simgrid::xbt::random #endif