Constructor
Gradient of the objective function. Gradient(a, b) should perform b = grad_f(a).
See Implementation