I did overload the operator() for my functor that now it receives two params. I know it possible, but how I invoke it? as far as I see, functions as std::transform or std::for_each iterate over single param each time.
minimal example:
struct Functor
{
Functor(double epsilon, double delta): ...
float operator()(int a, int b) const;
private:
_epsilon, _delta;
}
Functor f(.1, .2);
std::vector v = {1, 2, 3, 4}; // a should be taken from here each time
int b = 10;
std::vector k; // save result into k
std::transform(v.begin(), v.end(), b, k, f);
thank you!
edit: I do it because I want a to be taken each time from v, whereas b will be constant