Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Mpp
MLUQ
Commits
41f464a8
Commit
41f464a8
authored
May 11, 2021
by
niklas.baumgarten
Browse files
include variance check
parent
ee67995f
Changes
1
Hide whitespace changes
Inline
Side-by-side
mlmc/tests/montecarlo/TestMonteCarlo.cpp
View file @
41f464a8
...
@@ -12,15 +12,15 @@ INSTANTIATE_TEST_SUITE_P(TestMonteCarlo, TestMonteCarloParallelInterval, Values(
...
@@ -12,15 +12,15 @@ INSTANTIATE_TEST_SUITE_P(TestMonteCarlo, TestMonteCarloParallelInterval, Values(
TEST_P
(
TestMonteCarloSeriellInterval
,
TestMethodOnlyFine
)
{
TEST_P
(
TestMonteCarloSeriellInterval
,
TestMethodOnlyFine
)
{
EXPECT_NEAR
(
mc
.
aggregate
.
mean
.
Q
,
0.0
,
sqrt
(
1.0
/
dM
));
EXPECT_NEAR
(
mc
.
aggregate
.
mean
.
Q
,
0.0
,
sqrt
(
1.0
/
dM
));
EXPECT_NEAR
(
mc
.
aggregate
.
mean
.
Y
,
0.0
,
sqrt
(
1.0
/
dM
));
EXPECT_NEAR
(
mc
.
aggregate
.
mean
.
Y
,
0.0
,
sqrt
(
1.0
/
dM
));
//
EXPECT_NEAR(mc.aggregate.
S
VarQ, 1.0, sqrt(10.0 / dM));
EXPECT_NEAR
(
mc
.
aggregate
.
s
Var
.
Q
,
1.0
,
sqrt
(
10.0
/
dM
));
//
EXPECT_NEAR(mc.aggregate.
S
VarY, 1.0, sqrt(10.0 / dM));
EXPECT_NEAR
(
mc
.
aggregate
.
s
Var
.
Y
,
1.0
,
sqrt
(
10.0
/
dM
));
}
}
TEST_P
(
TestMonteCarloParallelInterval
,
TestMethodOnlyFine
)
{
TEST_P
(
TestMonteCarloParallelInterval
,
TestMethodOnlyFine
)
{
EXPECT_NEAR
(
mc
.
aggregate
.
mean
.
Q
,
0.0
,
sqrt
(
1.0
/
dM
));
EXPECT_NEAR
(
mc
.
aggregate
.
mean
.
Q
,
0.0
,
sqrt
(
1.0
/
dM
));
EXPECT_NEAR
(
mc
.
aggregate
.
mean
.
Y
,
0.0
,
sqrt
(
1.0
/
dM
));
EXPECT_NEAR
(
mc
.
aggregate
.
mean
.
Y
,
0.0
,
sqrt
(
1.0
/
dM
));
//
EXPECT_NEAR(mc.aggregate.
S
VarQ, 1.0, sqrt(10.0 / dM));
EXPECT_NEAR
(
mc
.
aggregate
.
s
Var
.
Q
,
1.0
,
sqrt
(
10.0
/
dM
));
//
EXPECT_NEAR(mc.aggregate.
S
VarY, 1.0, sqrt(10.0 / dM));
EXPECT_NEAR
(
mc
.
aggregate
.
s
Var
.
Y
,
1.0
,
sqrt
(
10.0
/
dM
));
}
}
int
main
(
int
argc
,
char
**
argv
)
{
int
main
(
int
argc
,
char
**
argv
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment