void eval_integrand(UserVector & output, std::vector<Scalar> & input) { int dimension = (int)alpha.size(); Scalar total = 0.0; Scalar point = 0.0; for (int i=0; i<dimension; i++) { point = 0.5*input[i]+0.5; total += powl(alpha[i]*(point-beta[i]),(long double)2.0); } output.clear(); output.resize(1,std::exp(-total)); }
void eval_integrand(UserVector & output, std::vector<Scalar> & input) { output.clear(); output.resize(1,std::exp(-input[0]*input[0]) +10.0*std::exp(-input[1]*input[1])); }
void eval_integrand(UserVector & output, std::vector<Scalar> & input) { output.clear(); output.resize(1,powl(input[0]+input[1],(long double)6.0)); }