ECF
1.5
D:
Projekt
ECF_trunk
examples
iprojekt
IntGenotypeMutOp.cpp
1
#include <ecf/ECF.h>
2
#include <ecf/ECF_base.h>
3
#include <cmath>
4
#include <sstream>
5
#include "IntGenotype.h"
6
7
namespace
IntGenotype
8
{
9
10
bool
IntGenotypeMutOp::mutate
(GenotypeP gene)
11
{
12
IntGenotype
* gen = (
IntGenotype
*) (gene.get());
13
14
15
int
a = state_->getRandomizer()->getRandomInteger(gen->intValues.size());
16
gen->intValues[a] = state_->getRandomizer()->getRandomInteger(gen->getUBound(), gen->getUBound());
17
18
19
return
true
;
20
}
21
22
}
IntGenotype::IntGenotype
Definition:
IntGenotype.h:14
IntGenotype::IntGenotypeMutOp::mutate
bool mutate(GenotypeP gene)
Performs mutation of a genotype object. The genotype object must be initialized!
Definition:
IntGenotypeMutOp.cpp:10
Generated on Wed Aug 3 2022 17:50:42 for ECF by
1.9.4