|
GALib-Parallel
Header-only C++ library for parallel evolutionary algorithms
|
Performs uniform mutation. More...
#include <UniformMutation.h>
Public Member Functions | |
| UniformMutation (GeneType lower, GeneType upper) | |
| Constructs the mutation operator. | |
| void | mutate (Individual< GeneType > &individual, double mutation_rate) override |
| Replaces genes with random values from [lower, upper]. | |
Public Member Functions inherited from galib::Mutation< GeneType > | |
| virtual | ~Mutation ()=default |
Performs uniform mutation.
Replaces a gene with a new value sampled uniformly from the range [lower, upper].
| GeneType | The numeric type of the genes. |
Definition at line 21 of file UniformMutation.h.
|
inline |
Constructs the mutation operator.
| lower | Lower bound for new random values. |
| upper | Upper bound for new random values. |
Definition at line 32 of file UniformMutation.h.
|
inlineoverridevirtual |
Replaces genes with random values from [lower, upper].
| individual | Target individual. |
| mutation_rate | Probability per gene. |
Implements galib::Mutation< GeneType >.
Definition at line 40 of file UniformMutation.h.
References galib::Individual< GeneType >::getGenotype().