|
GALib-Parallel
Header-only C++ library for parallel evolutionary algorithms
|
Performs boundary mutation. More...
#include <BoundaryMutation.h>
Public Member Functions | |
| BoundaryMutation (GeneType lower, GeneType upper) | |
| Constructs a boundary mutation operator. | |
| void | mutate (Individual< GeneType > &individual, double mutation_rate) override |
Randomly resets genes to lower or upper bounds. | |
Public Member Functions inherited from galib::Mutation< GeneType > | |
| virtual | ~Mutation ()=default |
Performs boundary mutation.
Replaces a gene with either the lower or upper bound of the search space. This is useful for exploring the edges of the feasible region.
| GeneType | The numeric type of the genes. |
Definition at line 22 of file BoundaryMutation.h.
|
inline |
Constructs a boundary mutation operator.
| lower | The lower bound of the search space. |
| upper | The upper bound of the search space. |
Definition at line 33 of file BoundaryMutation.h.
|
inlineoverridevirtual |
Randomly resets genes to lower or upper bounds.
| individual | Target individual. |
| mutation_rate | Probability per gene. |
Implements galib::Mutation< GeneType >.
Definition at line 41 of file BoundaryMutation.h.
References galib::Individual< GeneType >::getGenotype().