3 #include "../../catch2/catch.hpp"
7 #define MX_NO_ERROR_REPORTS
9 #include "../../../include/math/randomT.hpp"
18 SCENARIO(
"Verify compilation and basic operation of randomT with std::distributions",
"[math::randomT]" )
20 GIVEN(
"a uniform distribution is desired")
22 WHEN(
"two double random numbers from same generator requested")
32 WHEN(
"two double random numbers requested from different generators with same seed")
45 WHEN(
"two double random numbers requested from different generators with different seed")
59 GIVEN(
"a normal distribution is desired")
61 WHEN(
"two double random numbers from same generator requested")
71 WHEN(
"two double random numbers requested from different generators with same seed")
78 double r1 = normDist1;
79 double r2 = normDist2;
84 WHEN(
"two double random numbers requested from different generators with different seed")
91 double r1 = normDist1;
92 double r2 = normDist2;
106 SCENARIO(
"Verify compilation and basic operation of randomT with the Lapace distribution",
"[math::laplace_distribution]" )
108 GIVEN(
"a laplace distribution is desired")
110 WHEN(
"two double random numbers from same generator requested")
120 WHEN(
"two double random numbers requested from different generators with same seed")
127 double r1 = lapDist1;
128 double r2 = lapDist2;
133 WHEN(
"two double random numbers requested from different generators with different seed")
140 double r1 = lapDist1;
141 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]")