Commit 70d8b609 authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

implemented errors for mc

parent be4251e0
......@@ -15,14 +15,19 @@ struct Errors {
void Estimate(const WelfordAggregate &aggregate) {
numeric = EstimateNumeric(aggregate.mean);
stochastic = EstimateStochastic(aggregate.ctr, aggregate.sVar);
total = numeric + stochastic;
}
double EstimateNumeric(const Mean &mean) {
return mean.Y; // todo
if (mean.Q == mean.Y) {
Warning("Numeric error can't be estimated")
return 0.0;
}
return mean.Y;
}
double EstimateStochastic(const SampleCounter &ctr, const SVar &sVar) {
return sVar.Q / double(ctr.M);
return sqrt(sVar.Q / double(ctr.M));
}
};
......
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