MS-RCPSP
|
Base class for mutation operators. More...
#include <Mutator.h>
Public Member Functions | |
Mutator (double _p_mut) | |
virtual T * | mutate (T *sample) const =0 |
void | force_mutate (T *sample) const |
Protected Member Functions | |
virtual void | mutate_gene (T *sample, int idx) const =0 |
Protected Attributes | |
double | p_mut |
Base class for mutation operators.
If you want to implement your own mutation operator, create a subclass of Mutator and implement Mutator::mutate and Mutator::mutate_gene functions.
|
inline |
|
inline |
|
pure virtual |
Performs mutation on the given sample. Returns new sample instance.
Implemented in EvolutionaryAlgorithm::SimpleMutator< T >.
|
protectedpure virtual |
Mutates single gene in the specimen.
sample | Specimen to operate on. |
idx | Index of the gene to be mutated. |
|
protected |