00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __freESAsymmetricMutation_h
00023 #define __freESAsymmetricMutation_h
00024
00025 #include "freESMutationBase.h"
00026 #include <itkArray.h>
00027 #include "freAsymmetricVariateGenerator.h"
00028
00029 namespace FREE
00030 {
00031 namespace ES
00032 {
00033
00068 template <class TIndividual>
00069 class ITK_EXPORT AsymmetricMutation:
00070 public MutationBase<TIndividual>
00071 {
00072 public:
00074 typedef AsymmetricMutation<TIndividual> Self ;
00075 typedef MutationBase<TIndividual> Superclass;
00076 typedef itk::SmartPointer<Self> Pointer;
00077 typedef itk::SmartPointer<const Self> ConstPointer;
00078
00080 itkNewMacro(Self);
00081
00083 itkTypeMacro(AsymmetricMutation, MutationBase);
00084
00085 typedef typename Superclass::IndividualType IndividualType;
00086 typedef typename IndividualType::Pointer IndividualPointer;
00087 typedef typename Superclass::PopulationType PopulationType;
00088 typedef typename PopulationType::Pointer PopulationPointer;
00089
00090 void RegisterStrategicIndividualParameters(IndividualType& individual) const;
00091 void RegisterStrategicPopulationParameters(PopulationType& population) const;
00092 void MutateStrategicPopulationParameters(PopulationType& population) const;
00093 void MutateStrategicIndividualParameters(IndividualType& individual, PopulationType& population) const;
00094
00095 double MutateValue(const double& value);
00096
00097 itkSetMacro( Gamma, double );
00098 itkGetMacro( Gamma, double );
00099
00100 itkSetMacro( Tau, double );
00101 itkGetMacro( Tau, double );
00102
00103 itkSetMacro( TauGlobal, double );
00104 itkGetMacro( TauGlobal, double );
00105
00106 itkSetMacro( Tau_Skewness, double );
00107 itkGetMacro( Tau_Skewness, double );
00108
00109 itkSetMacro( TauGlobal_Skewness, double );
00110 itkGetMacro( TauGlobal_Skewness, double );
00111
00112 itkSetMacro( MutateValueVariance, double );
00113 itkGetMacro( MutateValueVariance, double );
00114
00115 itkSetMacro( MutateValueSkewness, double );
00116 itkGetMacro( MutateValueSkewness, double );
00117
00119 typedef itk::Statistics::AsymmetricVariateGenerator VariateGeneratorType ;
00120 VariateGeneratorType& GetRandomGenerator() {return *(m_RandomGenerator.GetPointer());};
00121
00122 protected:
00123 AsymmetricMutation() ;
00124
00126 double m_Gamma;
00127
00131 double m_TauGlobal;
00135 double m_Tau;
00136
00140 double m_TauGlobal_Skewness;
00144 double m_Tau_Skewness;
00145
00147 double m_MutateValueVariance;
00149 double m_MutateValueSkewness;
00150
00151 VariateGeneratorType::Pointer m_RandomGenerator;
00152
00153 void MutateObjectivParameters(IndividualType* pIndividual, PopulationType* pPopulation) const;
00154
00155 private:
00156 AsymmetricMutation(Self const&);
00157
00158 } ;
00159
00160 }
00161 }
00162
00163
00164 #ifndef ITK_MANUAL_INSTANTIATION
00165 #include "freESAsymmetricMutation.txx"
00166 #endif
00167
00168 #endif