Hello I have a function which signature is
std::string f(double x, double param1, double param2, double param3);
I would like to call it on a std::vector xvalues for the parameter x using something like std::transform for a particular value of param1, param2 and param3.
It would be the equivalent of:
double param1(1.);
double param2(1.1);
double param3(1.2);
std::vector<std::string> results();
for (std::vector<double>::const_iterator it = xvalues.begin() ; it != xvalues.end() ; ++xvalues)
{
results.push_back(f(*it, param1, param2, param3);
}
How can this be done in a more elegant manner ?
Kind regards Tony