18 #ifndef __itkSPSAOptimizer_h
19 #define __itkSPSAOptimizer_h
69 virtual void AdvanceOneStep(
void);
72 void StartOptimization(
void);
76 void ResumeOptimization(
void);
80 void StopOptimization(
void);
83 virtual MeasureType GetValue(
void)
const;
86 virtual MeasureType GetValue(
const ParametersType & parameters)
const;
101 virtual void GuessParameters(
103 double initialStepSize);
109 itkGetConstMacro(StopCondition, StopConditionType);
112 itkGetConstMacro(LearningRate,
double);
115 itkGetConstMacro(GradientMagnitude,
double);
118 itkGetConstReferenceMacro(Gradient, DerivativeType);
121 itkSetMacro(Sa,
double);
122 itkGetConstMacro(Sa,
double);
124 void Seta(
double a) { SetSa(a); }
125 double Geta() {
return GetSa(); }
129 itkSetMacro(Sc,
double);
130 itkGetConstMacro(Sc,
double);
132 void Setc(
double c) { SetSc(c); }
133 double Getc() {
return GetSc(); }
137 itkSetMacro(A,
double);
138 itkGetConstMacro(A,
double);
142 itkSetMacro(Alpha,
double);
143 itkGetConstMacro(Alpha,
double);
147 itkSetMacro(Gamma,
double);
148 itkGetConstMacro(Gamma,
double);
152 itkGetConstMacro(Maximize,
bool);
153 itkSetMacro(Maximize,
bool);
154 itkBooleanMacro(Maximize);
155 bool GetMinimize()
const
156 {
return !m_Maximize; }
157 void SetMinimize(
bool v)
158 { this->SetMaximize(!v); }
160 { this->MaximizeOff(); }
162 { this->MaximizeOn(); }
185 itkGetConstMacro(StateOfConvergence,
double);
188 itkSetMacro(StateOfConvergenceDecayRate,
double);
189 itkGetConstMacro(StateOfConvergenceDecayRate,
double);
203 itkSetMacro(Tolerance,
double);
204 itkGetConstMacro(Tolerance,
double);
208 const std::string GetStopConditionDescription()
const;
216 void PrintSelf(std::ostream & os,
Indent indent)
const;
246 virtual void GenerateDelta(
const unsigned int spaceDimension);
252 virtual void ComputeGradient(
259 void operator=(
const Self &);
279 #endif // end #ifndef __itkSPSAOptimizer_h