I can do this very easily without any changes to the C++ code. But maybeI like having C++ and python the same and (*f_)(value) looks kind of silly anyway.for consistency between C++ and Python it makes more sense to replace operator() with evaluate(feat) and evaluate_deriv(feat, &deriv) ?
If it can be made to work easily in python, I would propose have the deriv version return a pair or tuple in C++ too.
Sure. But consistency between function and its derivative seems like the main nontrivial thing to check.It would be really nice to be able to run tests on unary functions.Well, we already can, of course - just not on the derivatives.