5 #include <itkSingleValuedNonLinearOptimizer.h> 8 #include <AnimaOptimizersExport.h> 95 public itk::SingleValuedNonLinearOptimizer
118 itkSetMacro(Algorithm, nlopt_algorithm)
119 itkGetConstReferenceMacro(Algorithm, nlopt_algorithm)
122 itkSetMacro(ErrorCode, nlopt_result)
123 itkGetConstReferenceMacro(ErrorCode, nlopt_result)
125 std::
string GetErrorCodeDescription() const;
127 bool isSuccessful() const;
131 itkGetConstReferenceMacro(CurrentCost, MeasureType)
133 MeasureType GetValue()
const {
return this->GetCurrentCost();}
135 void SetLowerBoundParameters(
const ParametersType& p );
136 itkGetConstReferenceMacro(LowerBoundParameters, ParametersType)
138 void SetUpperBoundParameters(
const ParametersType& p );
139 itkGetConstReferenceMacro(UpperBoundParameters, ParametersType)
142 itkSetMacro(Maximize,
bool)
143 itkGetConstReferenceMacro(Maximize,
bool)
161 void SetStopVal(
double stopval) {m_StopValSet=
true; m_StopVal=stopval;}
162 itkGetConstReferenceMacro(StopVal,
double)
182 itkSetMacro(FTolRel,
double)
183 itkGetConstReferenceMacro(FTolRel,
double)
200 itkSetMacro(FTolAbs,
double)
201 itkGetConstReferenceMacro(FTolAbs,
double)
221 itkSetMacro(XTolRel,
double)
222 itkGetConstReferenceMacro(XTolRel,
double)
240 itkSetMacro(XTolAbs,
double)
241 itkGetConstReferenceMacro(XTolAbs,
double)
259 itkSetMacro(MaxEval,
int)
260 itkGetConstReferenceMacro(MaxEval,
int)
278 itkSetMacro(MaxTime,
double)
279 itkGetConstReferenceMacro(MaxTime,
double)
283 itkSetMacro(VectorStorageSize,
int)
284 itkGetConstReferenceMacro(VectorStorageSize,
int)
288 itkSetMacro(PopulationSize,
int)
289 itkGetConstReferenceMacro(PopulationSize,
int)
292 itkSetMacro(LocalOptimizer, nlopt_algorithm)
293 itkGetConstReferenceMacro(LocalOptimizer, nlopt_algorithm)
295 void StartOptimization() ITK_OVERRIDE;
300 itkGetMacro(VerboseLevel,
unsigned int)
301 itkSetMacro(VerboseLevel,
unsigned int)
304 void ClearInequalityConstraints();
306 void ClearEqualityConstraints();
312 void PrintSelf(std::ostream& os, itk::Indent indent)
const ITK_OVERRIDE;
313 static double NloptFunctionWrapper(
unsigned n,
const double *x,
double *grad,
void *data);
314 itkSetMacro(CurrentCost,
double)
317 nlopt_opt m_NloptOptions;
318 nlopt_opt m_NloptLocalOptions;
320 nlopt_algorithm m_Algorithm;
321 nlopt_algorithm m_LocalOptimizer;
323 nlopt_result m_ErrorCode;
338 int m_VectorStorageSize;
339 int m_PopulationSize;
341 unsigned int m_VerboseLevel;
344 MeasureType m_CurrentCost;
346 std::vector<ConstraintsFunctionType::Pointer> m_InequalityConstraints;
347 std::vector<ConstraintsFunctionType::Pointer> m_EqualityConstraints;
itk::SmartPointer< Self > Pointer
anima::NLOPTParametersConstraintFunction ConstraintsFunctionType
Implements an ITK wrapper for the NLOPT library.
SingleValuedNonLinearOptimizer Superclass
itk::SmartPointer< const Self > ConstPointer
CostFunctionType::Pointer CostFunctionPointer
itk::SingleValuedCostFunction CostFunctionType
SingleValuedNonLinearOptimizer::ParametersType ParametersType