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();
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 ParticleSwarmOptimizerBase( const
Self& );
213 void operator=( const Self& );
215 virtual
void ValidateSettings();
220 virtual
void Initialize();
222 void RandomInitialization();
223 void FileInitialization();
226 std::ostringstream m_StopConditionDescription;
227 bool m_InitializeNormalDistribution;
233 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.
Light weight base class for most itk classes.
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