Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
SamplingTest.cpp
Go to the documentation of this file.
1
#include "storm-config.h"
2
#include "
test/storm_gtest.h
"
3
4
#include <
storm/utility/random.h
>
5
6
namespace
{
7
8
TEST
(SamplingTest, SampleExponential) {
9
#if BOOST_VERSION < 106400
10
// Boost changed implementation of exponential distribution
11
// -> different values are returned
12
GTEST_SKIP();
13
return
;
14
#endif
15
boost::mt19937 gen(5u);
16
storm::utility::ExponentialDistributionGenerator
dist(5);
17
18
// Ensure that pseudo random numbers are the same on all machines
19
double
reference[] = {0.18241937154, 0.0522078772595, 0.0949721368604, 0.246869315378, 0.765000791199,
20
0.0177096648877, 0.225167598601, 0.23538530391, 1.01605360643, 0.138846355094};
21
for
(
int
i = 0;
i
< 10; ++
i
) {
22
EXPECT_NEAR(dist.random(gen), reference[i], 1e-10);
23
}
24
}
25
26
}
// namespace
TEST
TEST(OrderTest, Simple)
Definition
OrderTest.cpp:8
storm::utility::ExponentialDistributionGenerator
Definition
random.h:53
storm::storage::i
int i
Definition
BitVector.cpp:1244
random.h
storm_gtest.h
src
test
storm-dft
simulator
SamplingTest.cpp
Generated by
1.9.8