Slight re-design of the `Energy` class
Currently, most energy classes take constructor arguments which allow their curvatures to be inverted. This only makes sense as long as we are not working very much with sums of energies. In this latter case, it doesn't matter if the individual curvatures are invertible or not, we just need to make sure that the summed-up curvature is invertible.
I'd like to propose the following changes:
- All inversion-related functionality is removed from the energy classes we currently have
Energybase class gets a new method
make_curvature_invertible(), which takes an
IterationControllerand optionally another
Energythat serves as a preconditioner (we need an
Energyhere and not simply a
LinearOperator, since the preconditioning might depend on position). This method returns a new
Energyobject, with invertible curvature.
- we add a new class
SamplingEnabledEnergy, whose constructor takes two energies
IterationController. It returns an energy object that behaves like the sum of prior and likelihood, and returns a sampling-enabled curvature.