#include "hep/mc.hpp"
#include <cstddef>
#include <iostream>
#include <vector>
{
}
int main()
{
std::cout << ">> computing integral of 3*x^2 from 0 to 1 which is 1.0\n\n";
hep::make_integrand<double>(square, 1),
std::vector<std::size_t>(5, 1000)
).results();
auto result = hep::accumulate<hep::weighted_with_variance>(
results.begin() + 1, results.end());
double chi_square_dof = hep::chi_square_dof<hep::weighted_with_variance>(
results.begin() + 1, results.end());
std::cout << ">> cumulative result (excluding first iteration):\n>> N="
<< result.calls() << " I=" << result.value() << " +- " << result.error()
return 0;
}