GaFlipMutation
mutation chooses random number of values at random positions in chromosome's code and sets them with random value from chromosome's value set. Maximum number of changed values is specified in chromosomes parameters. This mutation changes at least one of the values.
More...
#include <D:/Temp/vs/gal/source/MutationOperations.h>
Inherits Chromosome::GaMutationOperation.
Public Member Functions | |
virtual GAL_API void GACALL | operator() (GaChromosome *chromosome) const |
More details are given in specification of GaMutationOperation::operator () method. | |
virtual GaParameters *GACALL | MakeParameters () const |
More details are given in specification of GaOperation::MakeParameters method. | |
virtual bool GACALL | CheckParameters (const GaParameters ¶meters) const |
More details are given in specification of GaOperation::CheckParameters method. |
GaFlipMutation
mutation chooses random number of values at random positions in chromosome's code and sets them with random value from chromosome's value set. Maximum number of changed values is specified in chromosomes parameters. This mutation changes at least one of the values.
This class has no built-in synchronizator, so LOCK_OBJECT
and LOCK_THIS_OBJECT
macros cannot be used with instances of this class. Because this genetic operation is stateless all public method are thread-safe.
void Chromosome::MutationOperations::GaFlipMutation::operator() | ( | GaChromosome * | chromosome | ) | const [virtual] |
More details are given in specification of GaMutationOperation::operator () method.
This method is thread-safe.
Implements Chromosome::GaMutationOperation.
virtual GaParameters* GACALL Chromosome::MutationOperations::GaFlipMutation::MakeParameters | ( | ) | const [inline, virtual] |
More details are given in specification of GaOperation::MakeParameters method.
This method is thread-safe.
Implements Common::GaOperation.
virtual bool GACALL Chromosome::MutationOperations::GaFlipMutation::CheckParameters | ( | const GaParameters & | parameters | ) | const [inline, virtual] |
More details are given in specification of GaOperation::CheckParameters method.
This method is thread-safe.
true
if mutation size specified in parameters is greater then 0, otherwise it returns false
.Implements Common::GaOperation.