Commit 25f82b20 authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

refactoring

parent 8a010958
#include "TestEllipticMultilevelMonteCarlo.hpp" #include "TestMultilevelMonteCarlo.hpp"
int main(int argc, char **argv) { int main(int argc, char **argv) {
......
#ifndef TESTELLIPTICMULTILEVELMONTECARLO_HPP #ifndef TESTMULTILEVELMONTECARLO_HPP
#define TESTELLIPTICMULTILEVELMONTECARLO_HPP #define TESTMULTILEVELMONTECARLO_HPP
#include "MultilevelEstimator.hpp" #include "MultilevelEstimator.hpp"
#include "TestEnvironment.hpp" #include "TestEnvironment.hpp"
struct TestStruct { struct TestParams {
Levels levels{3, 4, 5}; Levels levels{3, 4, 5};
Samples samples{12, 6, 3}; Samples samples{12, 6, 3};
}; };
class TestEllipticMultilevelMonteCarlo : public TestWithParam<TestStruct> { class TestMultilevelMonteCarlo : public TestWithParam<TestParams> {
protected: protected:
EstimatorMap estimatorMap; EstimatorMap estimatorMap;
MultilevelEstimator mlmc; MultilevelEstimator mlmc;
TestEllipticMultilevelMonteCarlo() { TestMultilevelMonteCarlo() {
CreateMonteCarloMap(estimatorMap, GetParam().levels, GetParam().samples); CreateMonteCarloMap(estimatorMap, GetParam().levels, GetParam().samples);
mlmc = MultilevelEstimator(estimatorMap); mlmc = MultilevelEstimator(estimatorMap);
mlmc.Method(); mlmc.Method();
} }
}; };
#endif //TESTELLIPTICMULTILEVELMONTECARLO_HPP #endif //TESTMULTILEVELMONTECARLO_HPP
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment