TestMultilevelMonteCarlo.hpp 581 Bytes
Newer Older
niklas.baumgarten's avatar
niklas.baumgarten committed
1
2
#ifndef TESTMULTILEVELMONTECARLO_HPP
#define TESTMULTILEVELMONTECARLO_HPP
niklas.baumgarten's avatar
niklas.baumgarten committed
3

niklas.baumgarten's avatar
niklas.baumgarten committed
4
5
#include "MultilevelEstimator.hpp"

niklas.baumgarten's avatar
niklas.baumgarten committed
6
7
8
#include "TestEnvironment.hpp"


niklas.baumgarten's avatar
niklas.baumgarten committed
9
struct TestParams {
niklas.baumgarten's avatar
niklas.baumgarten committed
10
11
  Levels levels{3, 4, 5};
  Samples samples{12, 6, 3};
niklas.baumgarten's avatar
niklas.baumgarten committed
12
13
};

niklas.baumgarten's avatar
niklas.baumgarten committed
14
class TestMultilevelMonteCarlo : public TestWithParam<TestParams> {
niklas.baumgarten's avatar
niklas.baumgarten committed
15
16
protected:
  EstimatorMap estimatorMap;
niklas.baumgarten's avatar
niklas.baumgarten committed
17

niklas.baumgarten's avatar
niklas.baumgarten committed
18
  MultilevelEstimator mlmc;
niklas.baumgarten's avatar
niklas.baumgarten committed
19

niklas.baumgarten's avatar
niklas.baumgarten committed
20
  TestMultilevelMonteCarlo() {
niklas.baumgarten's avatar
niklas.baumgarten committed
21
22
23
    CreateMonteCarloMap(estimatorMap, GetParam().levels, GetParam().samples);
    mlmc = MultilevelEstimator(estimatorMap);
    mlmc.Method();
niklas.baumgarten's avatar
niklas.baumgarten committed
24
  }
niklas.baumgarten's avatar
niklas.baumgarten committed
25
26
};

niklas.baumgarten's avatar
niklas.baumgarten committed
27
#endif //TESTMULTILEVELMONTECARLO_HPP