GALib-Parallel
Header-only C++ library for parallel evolutionary algorithms
Loading...
Searching...
No Matches
Public Member Functions | List of all members
galib::BoundaryMutation< GeneType > Class Template Reference

Performs boundary mutation. More...

#include <BoundaryMutation.h>

Inheritance diagram for galib::BoundaryMutation< GeneType >:
[legend]

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
 

Detailed Description

template<typename GeneType>
class galib::BoundaryMutation< GeneType >

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.

Template Parameters
GeneTypeThe numeric type of the genes.

Definition at line 22 of file BoundaryMutation.h.

Constructor & Destructor Documentation

◆ BoundaryMutation()

template<typename GeneType >
galib::BoundaryMutation< GeneType >::BoundaryMutation ( GeneType  lower,
GeneType  upper 
)
inline

Constructs a boundary mutation operator.

Parameters
lowerThe lower bound of the search space.
upperThe upper bound of the search space.

Definition at line 33 of file BoundaryMutation.h.

Member Function Documentation

◆ mutate()

template<typename GeneType >
void galib::BoundaryMutation< GeneType >::mutate ( Individual< GeneType > &  individual,
double  mutation_rate 
)
inlineoverridevirtual

Randomly resets genes to lower or upper bounds.

Parameters
individualTarget individual.
mutation_rateProbability per gene.

Implements galib::Mutation< GeneType >.

Definition at line 41 of file BoundaryMutation.h.

References galib::Individual< GeneType >::getGenotype().


The documentation for this class was generated from the following file: