18 #ifndef itkSPSAOptimizer_h
19 #define itkSPSAOptimizer_h
23 #include "ITKOptimizersExport.h"
70 virtual void AdvanceOneStep();
73 virtual void StartOptimization(
void) ITK_OVERRIDE;
77 void ResumeOptimization();
81 void StopOptimization();
84 virtual MeasureType GetValue() const;
87 virtual MeasureType GetValue(const ParametersType & parameters) const;
102 virtual
void GuessParameters(
104 double initialStepSize);
110 itkGetConstMacro(StopCondition, StopConditionType);
113 itkGetConstMacro(LearningRate,
double);
116 itkGetConstMacro(GradientMagnitude,
double);
119 itkGetConstReferenceMacro(Gradient, DerivativeType);
122 itkSetMacro(Sa,
double);
123 itkGetConstMacro(Sa,
double);
125 void Seta(
double a) { SetSa(a); }
126 double Geta() {
return GetSa(); }
130 itkSetMacro(Sc,
double);
131 itkGetConstMacro(Sc,
double);
133 void Setc(
double c) { SetSc(c); }
134 double Getc() {
return GetSc(); }
138 itkSetMacro(A,
double);
139 itkGetConstMacro(A,
double);
143 itkSetMacro(Alpha,
double);
144 itkGetConstMacro(Alpha,
double);
148 itkSetMacro(Gamma,
double);
149 itkGetConstMacro(Gamma,
double);
153 itkGetConstMacro(Maximize,
bool);
154 itkSetMacro(Maximize,
bool);
155 itkBooleanMacro(Maximize);
157 {
return !m_Maximize; }
159 { this->SetMaximize(!v); }
161 { this->MaximizeOff(); }
163 { this->MaximizeOn(); }
186 itkGetConstMacro(StateOfConvergence,
double);
189 itkSetMacro(StateOfConvergenceDecayRate,
double);
190 itkGetConstMacro(StateOfConvergenceDecayRate,
double);
204 itkSetMacro(Tolerance,
double);
205 itkGetConstMacro(Tolerance,
double);
209 virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE;
214 virtual ~SPSAOptimizer() {}
217 virtual void PrintSelf(std::ostream & os,
Indent indent)
const ITK_OVERRIDE;
247 virtual void GenerateDelta(
const unsigned int spaceDimension);
253 virtual void ComputeGradient(
255 DerivativeType & gradient);
260 void operator=(
const Self &);
280 #endif // end #ifndef itkSPSAOptimizer_h
SmartPointer< const Self > ConstPointer
Light weight base class for most itk classes.
double m_StateOfConvergence
An optimizer based on simultaneous perturbation...
This class is a base for the Optimization methods that optimize a single valued function.
StopConditionType m_StopCondition
unsigned long SizeValueType
double m_StateOfConvergenceDecayRate
SizeValueType m_CurrentIteration
SmartPointer< Self > Pointer
SizeValueType m_NumberOfPerturbations
DerivativeType m_Gradient
double m_GradientMagnitude
Statistics::MersenneTwisterRandomVariateGenerator::Pointer m_Generator
SizeValueType m_MinimumNumberOfIterations
SizeValueType m_MaximumNumberOfIterations
SingleValuedNonLinearOptimizer Superclass
Control indentation during Print() invocation.