Commit 000a690b authored by niklas.baumgarten's avatar niklas.baumgarten

worked on output

parent b7b64719
......@@ -58,7 +58,7 @@ void MultilevelMonteCarlo::Method(const double eps) {
updateSampleAmount(eps);
if (checkForNewLevel()) {
estimateNumericalError();
if (numErr > eps/2) {
if (numErr > eps / 2) {
appendLevel(eps);
} else {
estimateStatisticalError();
......@@ -121,9 +121,9 @@ void MultilevelMonteCarlo::updateSampleAmount(const double &eps) {
mapMonteCarlo[mc.first]->dM = optimalM - mapMonteCarlo[mc.first]->M;
}
string msg = "dM:";
for (auto &mc:mapMonteCarlo) msg += " " + to_string(mc.second->dM);
vout(1) << msg << endl;
vout(1) << "dM=[";
for (auto &mc:mapMonteCarlo) vout(1) << " " << mc.second->dM;
vout(1) << "]" << endl;
}
bool MultilevelMonteCarlo::checkForNewLevel() {
......@@ -239,17 +239,17 @@ void MultilevelMonteCarlo::ShowKurtosisWarning() {
void MultilevelMonteCarlo::ShowExponentResults() {
estimateExponents();
vout(1) << endl << "alpha = " << setw(10) << alpha
vout(1) << endl << "alpha = " << setw(12) << alpha
<< " (exponent for the weak convergence of the FEM)"
<< endl << " beta = " << setw(10) << beta
<< endl << " beta = " << setw(12) << beta
<< " (exponent for the decay of the variance)"
<< endl << "gamma = " << setw(10) << gamma
<< endl << "gamma = " << setw(12) << gamma
<< " (exponent for the growth of the cost)"
<< endl << "numErr = " << setw(10) << numErr
<< endl << "numErr = " << setw(12) << numErr
<< " (estimated numerical error)"
<< endl << "statErr = " << setw(10) << statErr
<< endl << "statErr = " << setw(12) << statErr
<< " (estimated statistical error)"
<< endl << "error = " << setw(10) << totalErr
<< endl << "error = " << setw(12) << totalErr
<< " (estimated total error)"
<< endl;
}
......@@ -259,7 +259,7 @@ void MultilevelMonteCarlo::ShowResultsMLMCRun(double eps) {
string level_str = vec2str(levels);
string sample_str = vec2str(numsamples);
vout(1) << setw(6) << eps << setw(12) << value << setw(12) << cost
<< setw(14) << level_str << setw(36) << sample_str << endl;
<< setw(14) << level_str << setw(36) << sample_str << endl;
ShowTableBottom();
}
......
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