19 #ifndef itkParticleSwarmOptimizerBase_h
20 #define itkParticleSwarmOptimizerBase_h
24 #include "ITKOptimizersExport.h"
95 itkSetMacro( InitializeNormalDistribution,
bool )
96 itkGetMacro( InitializeNormalDistribution,
bool )
97 itkBooleanMacro( InitializeNormalDistribution )
104 void SetInitialSwarm( const
SwarmType &initialSwarm );
113 itkSetMacro( PrintSwarm,
bool )
114 itkGetMacro( PrintSwarm,
bool )
115 itkBooleanMacro( PrintSwarm )
118 virtual
void StartOptimization(
void ) ITK_OVERRIDE;
163 itkSetMacro( FunctionConvergenceTolerance,
MeasureType )
164 itkGetMacro( FunctionConvergenceTolerance,
MeasureType )
168 void SetParametersConvergenceTolerance( ValueType convergenceTolerance,
172 itkGetMacro( PercentageParticlesConverged,
double )
173 itkSetMacro( PercentageParticlesConverged,
double )
184 itkSetMacro( UseSeed,
bool )
185 itkGetMacro( UseSeed,
bool )
186 itkBooleanMacro( UseSeed)
194 virtual const std::
string GetStopConditionDescription() const ITK_OVERRIDE;
200 void PrintSwarm( std::ostream& os,
Indent indent ) const;
204 virtual ~ParticleSwarmOptimizerBase() ITK_OVERRIDE;
205 virtual
void PrintSelf( std::ostream& os,
Indent indent ) const ITK_OVERRIDE;
206 void PrintParamtersType( const
ParametersType& x, std::ostream& os ) const;
210 virtual
void UpdateSwarm() = 0;
212 ITK_DISALLOW_COPY_AND_ASSIGN(ParticleSwarmOptimizerBase);
214 virtual
void ValidateSettings();
219 virtual
void Initialize();
221 void RandomInitialization();
222 void FileInitialization();
225 std::ostringstream m_StopConditionDescription;
226 bool m_InitializeNormalDistribution;
232 double m_PercentageParticlesConverged;
SmartPointer< Self > Pointer
std::vector< ParticleData > SwarmType
std::vector< std::pair< ParametersType::ValueType, ParametersType::ValueType > > ParameterBoundsType
This class is a base for the CostFunctions returning a single value.
Statistics::MersenneTwisterRandomVariateGenerator RandomVariateGeneratorType
unsigned int NumberOfParticlesType
CostFunctionType::MeasureType m_BestValue
MersenneTwisterRandom random variate generator.
ParametersType m_CurrentParameters
This class is a base for the Optimization methods that optimize a single valued function.
ParametersType::ValueType ValueType
ParticleSwarmOptimizerBase Self
unsigned int NumberOfIterationsType
CostFunctionType::MeasureType m_CurrentValue
ParametersType m_CurrentVelocity
SmartPointer< const Self > ConstPointer
unsigned int NumberOfGenerationsType
ParametersType m_BestParameters
SingleValuedNonLinearOptimizer Superclass
Control indentation during Print() invocation.
Abstract implementation of a Particle Swarm Optimization (PSO) algorithm.
CostFunctionType::MeasureType MeasureType