19 #ifndef itkParticleSwarmOptimizerBase_h
20 #define itkParticleSwarmOptimizerBase_h
24 #include "ITKOptimizersExport.h"
70 using ParameterBoundsType = std::vector<std::pair<ParametersType::ValueType, ParametersType::ValueType>>;
94 itkSetMacro(InitializeNormalDistribution,
bool);
95 itkGetMacro(InitializeNormalDistribution,
bool);
96 itkBooleanMacro(InitializeNormalDistribution);
105 SetInitialSwarm(
const SwarmType & initialSwarm);
115 itkSetMacro(PrintSwarm,
bool);
116 itkGetMacro(PrintSwarm,
bool);
117 itkBooleanMacro(PrintSwarm);
122 StartOptimization()
override;
152 SetParameterBounds(std::pair<ParametersType::ValueType, ParametersType::ValueType> & bounds,
unsigned int n);
156 GetParameterBounds()
const;
172 itkSetMacro(FunctionConvergenceTolerance,
MeasureType);
173 itkGetMacro(FunctionConvergenceTolerance,
MeasureType);
178 SetParametersConvergenceTolerance(
ValueType convergenceTolerance,
unsigned int sz);
181 itkGetMacro(PercentageParticlesConverged,
double);
182 itkSetMacro(PercentageParticlesConverged,
double);
195 itkSetMacro(UseSeed,
bool);
196 itkGetMacro(UseSeed,
bool);
197 itkBooleanMacro(UseSeed);
208 GetStopConditionDescription()
const override;
215 PrintSwarm(std::ostream & os,
Indent indent)
const;
221 PrintSelf(std::ostream & os,
Indent indent)
const override;
223 PrintParamtersType(
const ParametersType & x, std::ostream & os)
const;
240 RandomInitialization();
242 FileInitialization();