Harmonize ConjugateGradient with other minimizers?
In principle, ConjugateGradient is not fundamentally different from our descent minimizers, but its interface (including the form of the callbacks) is very different.
Wouldn't it be helpful to adjust it in a way that it also takes an
Energy object for minimization and passes its current energy to the callback in the same way the descent minimizers do? Then we could, for example, replace
ConjugateGradient objects with, say,
VL_BFGS ones and experiment much more flexibly with different minimizers.
ConjugateGradient would need a special subclass of
Energy to work properly: it would, for example, need to invoke the linear operator within this energy directly. But that should be no fundamental problem ... after all, we already have some energy classes that provide
curvature and some that don't.
I would be very interested to hear feedback!