Support for methods to efficiently calculate inner products with residuals/derivatives
Such as \Delta'*J (*v). Cost gradients fall in this category.
This could be done using a backward differentiation more efficiently.
This could be done by overloading the dr method to take optionally vector/matrices for \Delta and vector/matrices for v. Delta = I and v = I would just return the Jacobian, but if v = single vector, then only a directional derivative is needed. If Delta = single vector then backward differentation tricks could be used. Similar things could be done for second derivatives, although it is not clear what the use case there would be.