As an improvement of #17 even, we should introduce a better interface for gradient, differential, Jacobin, Hessian and proximal map (also partly discussed in #37).
Proposal of an interface
Any of the interface functions should have as first argument the manifold, as second the function it provides the diff for, if no further argument is provided, a function is returned, if a third – point – is provided, the prox/gradient /Jacobian is evaluatioed, for the Differential, its Adjoint or the Hessian, one further argument would be necessary.
The same holds for the in-place variants.
The implementation should be changed to use these interfaces instead of the current (little clumsy) naming scheme. Maybe this is best explained in examples.
Examples
gradient(M, distance; parameters=(q,)) # gradient of distance(M, p, q) as a functions p -> X /in TpM)
gradient(M, distance, p; parameters=(q,)) # the previous evaluated at p
gradient!(M, distance; parameters=(q,)) # the previous in-place variant (p,X) -> X that works in-place of X
gradient!(M, distance, p, X; parameters=(q,)) # the previous evaluated in-place of X
where one open points would be to discuss a good interface for parameters like the fixed value q (or geodesic parameters in the derivative and such).
As an improvement of #17 even, we should introduce a better interface for gradient, differential, Jacobin, Hessian and proximal map (also partly discussed in #37).
Proposal of an interface
Any of the interface functions should have as first argument the manifold, as second the function it provides the diff for, if no further argument is provided, a function is returned, if a third – point – is provided, the prox/gradient /Jacobian is evaluatioed, for the Differential, its Adjoint or the Hessian, one further argument would be necessary.
The same holds for the in-place variants.
The implementation should be changed to use these interfaces instead of the current (little clumsy) naming scheme. Maybe this is best explained in examples.
Examples
where one open points would be to discuss a good interface for parameters like the fixed value q (or geodesic parameters in the derivative and such).