18 #ifndef itkLBFGS2Optimizerv4_h
19 #define itkLBFGS2Optimizerv4_h
23 #include "ITKOptimizersv4Export.h"
110 LINESEARCH_DEFAULT = 0,
113 LINESEARCH_MORETHUENTE = 0,
124 LINESEARCH_BACKTRACKING_ARMIJO = 1,
127 LINESEARCH_BACKTRACKING = 2,
139 LINESEARCH_BACKTRACKING_WOLFE = 2,
151 LINESEARCH_BACKTRACKING_STRONG_WOLFE = 3,
180 void StartOptimization(
bool doOnlyInitialization =
false)
override;
198 void SetHessianApproximationAccuracy(
int m);
199 int GetHessianApproximationAccuracy()
const;
221 void SetDeltaConvergenceDistance(
int nPast);
222 int GetDeltaConvergenceDistance()
const;
248 void SetMaximumIterations(
int maxIterations);
249 int GetMaximumIterations()
const;
264 void SetLineSearch(
const LineSearchMethod &linesearch);
265 LineSearchMethod GetLineSearch()
const;
273 void SetMaximumLineSearchEvaluations(
int n);
274 int GetMaximumLineSearchEvaluations()
const;
284 void SetMinimumLineSearchStep(PrecisionType step);
285 PrecisionType GetMinimumLineSearchStep()
const;
295 void SetMaximumLineSearchStep(PrecisionType step);
296 PrecisionType GetMaximumLineSearchStep()
const;
304 void SetLineSearchAccuracy( PrecisionType ftol );
305 PrecisionType GetLineSearchAccuracy()
const;
318 void SetWolfeCoefficient( PrecisionType wc );
319 PrecisionType GetWolfeCoefficient()
const;
334 void SetLineSearchGradientAccuracy( PrecisionType gtol );
335 PrecisionType GetLineSearchGradientAccuracy()
const;
345 void SetMachinePrecisionTolerance(PrecisionType xtol);
346 PrecisionType GetMachinePrecisionTolerance()
const;
362 void SetOrthantwiseCoefficient( PrecisionType orthant_c);
363 PrecisionType GetOrthantwiseCoefficient()
const;
380 void SetOrthantwiseStart(
int start);
381 int GetOrthantwiseStart()
const;
391 void SetOrthantwiseEnd(
int end);
392 int GetOrthantwiseEnd()
const;
396 itkGetConstMacro(CurrentParameterNorm, PrecisionType);
399 itkGetConstMacro(CurrentGradientNorm, PrecisionType);
404 itkGetConstMacro(CurrentStepSize, PrecisionType);
407 itkGetConstMacro(CurrentNumberOfEvaluations, PrecisionType);
412 void PrintSelf(std::ostream & os,
Indent indent)
const override;
416 static int UpdateProgressCallback(
void *
Instance,
417 const PrecisionType *x,
418 const PrecisionType *g,
419 const PrecisionType fx,
420 const PrecisionType xnorm,
421 const PrecisionType gnorm,
422 const PrecisionType step,
429 int UpdateProgress(
const PrecisionType *x,
430 const PrecisionType *g,
431 const PrecisionType fx,
432 const PrecisionType xnorm,
433 const PrecisionType gnorm,
434 const PrecisionType step,
441 static PrecisionType EvaluateCostCallback(
void *instance,
442 const PrecisionType *x,
445 const PrecisionType step
448 PrecisionType EvaluateCost(
const PrecisionType *x,
451 const PrecisionType step
456 class PrivateImplementationHolder;
458 std::unique_ptr<PrivateImplementationHolder>
m_Pimpl;
Light weight base class for most itk classes.
const double * m_CurrentParameter
unsigned long SizeValueType
void SetNumberOfIterations(const SizeValueType _arg) override
double m_CurrentParameterNorm
double m_CurrentGradientNorm
SizeValueType GetNumberOfIterations() const override
std::unique_ptr< PrivateImplementationHolder > m_Pimpl
Wrap of the libLBFGS[1] algorithm for use in ITKv4 registration framework. LibLBFGS is a translation ...
Superclass::ScalesType ScalesType
const double * m_CurrentGradient
Control indentation during Print() invocation.
Superclass::MetricType MetricType
Superclass::ParametersType ParametersType
Abstract base for object-to-object optimizers.
std::string StopConditionReturnStringType
int m_CurrentNumberOfEvaluations