#include "hep/mc.hpp"
#include <iostream>
#include <vector>
int main()
{
std::vector<hep::mc_result<double>> results = {
};
for (std::size_t i = 0; i != results.size(); ++i)
{
auto result = hep::accumulate<hep::weighted_with_variance>(
results.begin(), results.begin() + (i+1));
auto chi_square_dof = hep::chi_square_dof<hep::weighted_with_variance>(
results.begin(), results.begin() + (i+1));
std::cout << ">> printing cumulative result for results 0 till " << i
<< "\nmethod 0: E=" << result.value() << " +- " << result.error()
result = hep::accumulate<hep::weighted_equally>(results.begin(),
results.begin() + (i+1));
results.begin(), results.begin() + (i+1));
std::cout << "method 1: E=" << result.value() << " +- "
}
return 0;
}