4#include "../../catch2/catch.hpp"
8#define MX_NO_ERROR_REPORTS
20TEST_CASE(
"Verify compilation and basic operation of randomT with std::distributions",
"[math::randomT]" )
22 GIVEN(
"a uniform distribution is desired" )
24 WHEN(
"two double random numbers from same generator requested" )
27 uniDist.
seed( 0xA11CE001 );
35 WHEN(
"two double random numbers requested from different generators with same seed" )
48 WHEN(
"two double random numbers requested from different generators with different seed" )
62 GIVEN(
"a normal distribution is desired" )
64 WHEN(
"two double random numbers from same generator requested" )
67 normDist.
seed( 0xA11CE002 );
75 WHEN(
"two double random numbers requested from different generators with same seed" )
82 double r1 = normDist1;
83 double r2 = normDist2;
88 WHEN(
"two double random numbers requested from different generators with different seed" )
95 double r1 = normDist1;
96 double r2 = normDist2;
111TEST_CASE(
"Verify compilation and basic operation of randomT with the Laplace distribution",
112 "[math::laplace_distribution]" )
114 GIVEN(
"a laplace distribution is desired" )
116 WHEN(
"two double random numbers from same generator requested" )
119 lapDist.
seed( 0xA11CE003 );
127 WHEN(
"two double random numbers requested from different generators with same seed" )
134 double r1 = lapDist1;
135 double r2 = lapDist2;
140 WHEN(
"two double random numbers requested from different generators with different seed" )
147 double r1 = lapDist1;
148 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.
TEST_CASE("Verify compilation and basic operation of randomT with std::distributions", "[math::randomT]")
Defines a random number type.