18#ifndef itkSPSAOptimizer_h
19#define itkSPSAOptimizer_h
23#include "ITKOptimizersExport.h"
40 MaximumNumberOfIterations,
46extern ITKOptimizers_EXPORT std::ostream &
83#if !defined(ITK_LEGACY_REMOVE)
88 StopConditionSPSAOptimizerEnum::MaximumNumberOfIterations;
141 itkGetConstMacro(LearningRate,
double);
144 itkGetConstMacro(GradientMagnitude,
double);
150 itkSetMacro(Sa,
double);
151 itkGetConstMacro(Sa,
double);
166 itkSetMacro(Sc,
double);
167 itkGetConstMacro(Sc,
double);
182 itkSetMacro(A,
double);
183 itkGetConstMacro(A,
double);
187 itkSetMacro(Alpha,
double);
188 itkGetConstMacro(Alpha,
double);
192 itkSetMacro(Gamma,
double);
193 itkGetConstMacro(Gamma,
double);
197 itkGetConstMacro(Maximize,
bool);
198 itkSetMacro(Maximize,
bool);
199 itkBooleanMacro(Maximize);
208 this->SetMaximize(!v);
242 itkGetConstMacro(StateOfConvergence,
double);
245 itkSetMacro(StateOfConvergenceDecayRate,
double);
246 itkGetConstMacro(StateOfConvergenceDecayRate,
double);
260 itkSetMacro(Tolerance,
double);
261 itkGetConstMacro(Tolerance,
double);
279 double m_LearningRate{};
283 bool m_Stop{
false };
287 double m_StateOfConvergence{};
325 double m_StateOfConvergenceDecayRate{};
326 double m_Tolerance{};
328 double m_GradientMagnitude{};
340extern ITKOptimizers_EXPORT std::ostream &
Array class with size defined at construction time.
Control indentation during Print() invocation.
Light weight base class for most itk classes.
Contains all enum classes used by SPSAOptimizer class.
StopConditionSPSAOptimizer
An optimizer based on simultaneous perturbation...
void StartOptimization() override
SPSAOptimizerEnums::StopConditionSPSAOptimizer StopConditionSPSAOptimizerEnum
void PrintSelf(std::ostream &os, Indent indent) const override
virtual void GenerateDelta(const unsigned int spaceDimension)
virtual double Compute_a(SizeValueType k) const
~SPSAOptimizer() override=default
virtual void AdvanceOneStep()
virtual void ComputeGradient(const ParametersType ¶meters, DerivativeType &gradient)
virtual double Compute_c(SizeValueType k) const
std::string GetStopConditionDescription() const override
virtual void GuessParameters(SizeValueType numberOfGradientEstimates, double initialStepSize)
virtual MeasureType GetValue() const
virtual MeasureType GetValue(const ParametersType ¶meters) const
void ResumeOptimization()
This class is a base for the Optimization methods that optimize a single valued function.
CostFunctionType::MeasureType MeasureType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
ITKCommon_EXPORT std::ostream & operator<<(std::ostream &out, typename AnatomicalOrientation::CoordinateEnum value)
unsigned long SizeValueType