SparseGradient and Derivative

Hello everyone,

Simple question: why is SparseGradient not inheriting from the Derivative interface? It seems doable to add the missing methods.

Cheers,
Romain.

It’s an oversight (I keep forgetting about this class). Indeed, Gradient implements Derivative and implements properly all required methods (there is a dedicated check for derivation orders in getPartialDerivative).

Ok thanks. I’ll create an issue where I think I will also add a new interface to reduce code duplication between SparseGradient, Gradient, and UnivariateDerivative1. Ditto for Field.

Cheers,
Romain.

1 Like