#include <DifferentiableEnergyInterface.hpp>
Public Member Functions | |
virtual const ublas::vector < float_t > & | current_gradient () const =0 |
virtual void | set_argument_with_gradient ()=0 |
In addition to the requirements of EnergyInterface, classes implementing DifferentiableEnergyInterface provide a current gradient computed from the current argument. These energy can be minimized using gradient based minimization techniques.
virtual const ublas::vector<float_t>& imaging::DifferentiableEnergyInterface::current_gradient | ( | ) | const [pure virtual] |
Returns the current gradient. This function should not actually compute the current energy but return the cached result of the last call to set_argument()!
Implemented in imaging::DifferentiableFunctionalAdaptor< functional_t >, and imaging::MumfordShahEnergy< shape_t >.
Referenced by imaging::SteepestDescent::minimize(), and imaging::NlCg::minimize().
virtual void imaging::DifferentiableEnergyInterface::set_argument_with_gradient | ( | ) | [pure virtual] |
Compute the energy value and the gradient corresponding to the current argument. This is where the main work of the energy evaluation should be done. In contrast to set_argument() this function also computes the gradient. I.e. in general it is more expensive than set_argument().
Implemented in imaging::DifferentiableFunctionalAdaptor< functional_t >, and imaging::MumfordShahEnergy< shape_t >.
Referenced by imaging::SteepestDescent::minimize(), and imaging::NlCg::minimize().