20 #ifndef MIRTK_ConjugateGradientDescent_H 21 #define MIRTK_ConjugateGradientDescent_H 23 #include "mirtk/GradientDescent.h" 24 #include "mirtk/Math.h" 44 mirtkPublicAttributeMacro(
bool, UseConjugateGradient);
50 mirtkPublicAttributeMacro(
bool, ConjugateTotalGradient);
82 virtual bool Set(
const char *,
const char *);
115 virtual void Gradient(
double *,
double = .0,
bool * = NULL);
136 this->UseConjugateGradient(
true);
142 this->UseConjugateGradient(
true);
143 this->ConjugateTotalGradient(
true);
149 this->ConjugateTotalGradient(
false);
155 this->UseConjugateGradient(
false);
161 #endif // MIRTK_ConjugateGradientDescent_H void ConjugateGradientOn()
Enable conjugation of data fidelity gradient.
virtual ~ConjugateGradientDescent()
Destructor.
void ConjugateTotalGradientOn()
Enable conjugation of objective function gradient.
void CopyAttributes(const ConjugateGradientDescent &)
Copy attributes of this class from another instance.
virtual bool Set(const char *, const char *)
Set parameter value from string.
virtual ParameterList Parameter() const
Get parameters as key/value as string map.
void ConjugateTotalGradientOff()
Array< Pair< string, string > > ParameterList
Ordered list of parameter name/value pairs.
void ResetConjugateGradient()
Reset conjugate gradient to objective function gradient.
ConjugateGradientDescent(ObjectiveFunction *=NULL)
Constructor.
virtual void Initialize()
Initialize gradient descent.
virtual ParameterList Parameter() const
Get parameters as key/value as string map.
ConjugateGradientDescent & operator=(const ConjugateGradientDescent &)
Assignment operator.
virtual void Gradient(double *, double=.0, bool *=NULL)
Compute gradient of objective function and make it conjugate.
void ConjugateGradientOff()
Disable conjugation of objective function gradient.
virtual void Finalize()
Finalize gradient descent.
void ConjugateGradient(double *)
Compute conjugate gradient.