3#include "../../catch2/catch.hpp"
7#define MX_NO_ERROR_REPORTS
9#include "../../../include/math/randomT.hpp"
19SCENARIO(
"Verify compilation and basic operation of randomT with std::distributions",
"[math::randomT]" )
21 GIVEN(
"a uniform distribution is desired" )
23 WHEN(
"two double random numbers from same generator requested" )
33 WHEN(
"two double random numbers requested from different generators with same seed" )
46 WHEN(
"two double random numbers requested from different generators with different seed" )
60 GIVEN(
"a normal distribution is desired" )
62 WHEN(
"two double random numbers from same generator requested" )
72 WHEN(
"two double random numbers requested from different generators with same seed" )
79 double r1 = normDist1;
80 double r2 = normDist2;
85 WHEN(
"two double random numbers requested from different generators with different seed" )
92 double r1 = normDist1;
93 double r2 = normDist2;
108SCENARIO(
"Verify compilation and basic operation of randomT with the Laplace distribution",
109 "[math::laplace_distribution]" )
111 GIVEN(
"a laplace distribution is desired" )
113 WHEN(
"two double random numbers from same generator requested" )
123 WHEN(
"two double random numbers requested from different generators with same seed" )
130 double r1 = lapDist1;
131 double r2 = lapDist2;
136 WHEN(
"two double random numbers requested from different generators with different seed" )
143 double r1 = lapDist1;
144 double r2 = lapDist2;
A random number type, which functions like any other arithmetic type.
void seed(typename ranengT::result_type seedval)
Set the seed of the random engine.
SCENARIO("Verify compilation and basic operation of randomT with std::distributions", "[math::randomT]")