Commit 585cf177 authored by Joseph Pallamidessi's avatar Joseph Pallamidessi

Fix a serious scope assignement error, which was causing a self assignement

parent 9442a14b
......@@ -69,7 +69,7 @@ size_t CSelectionOperator::selectNext(size_t populationSize){ return 0; }
void MaxDeterministic::initialize(CIndividual** population, float selectionPressure,size_t populationSize){
CSelectionOperator::initialize(population,selectionPressure,populationSize);
CPopulation::sortPopulation(population,populationSize);
populationSize = populationSize;
this->populationSize = populationSize;
}
size_t MaxDeterministic::selectNext(size_t populationSize){
......@@ -86,7 +86,7 @@ float MaxDeterministic::getExtremum(){
void MinDeterministic::initialize(CIndividual** population, float selectionPressure,size_t populationSize){
CSelectionOperator::initialize(population,selectionPressure,populationSize);
CPopulation::sortRPopulation(population,populationSize);
populationSize = populationSize;
this->populationSize = populationSize;
}
size_t MinDeterministic::selectNext(size_t populationSize){
......@@ -249,7 +249,7 @@ size_t MaxTournament::selectNext(size_t populationSize){
void MaxRoulette::initialize(CIndividual** population, float selectionPressure, size_t populationSize) {
CSelectionOperator::initialize(population,selectionPressure,populationSize);
CPopulation::sortRPopulation(population,populationSize);
populationSize = populationSize;
this->populationSize = populationSize;
}
size_t MaxRoulette::selectNext(size_t populationSize){
......
......@@ -81,7 +81,7 @@ class MaxRandom : public CSelectionOperator{
virtual size_t selectNext(size_t populationSize);
float getExtremum();
private:
size_t populationSize;
//size_t populationSize;
CRandomGenerator* rg;
};
......@@ -93,7 +93,7 @@ class MinRandom : public CSelectionOperator{
virtual size_t selectNext(size_t populationSize);
float getExtremum();
private:
size_t populationSize;
//size_t populationSize;
CRandomGenerator* rg;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment