Add usage of operators in Generation and Chromosome.
[genetic.git] / src / selection / roulette.h
index 6db71efbd38491dd7259db4f919521a963270c19..b5c1f33e1b5c55701c8d7452320f3520f84f753d 100644 (file)
@@ -109,8 +109,8 @@ namespace genetic {
                 vector<_Chromosome> selected;
                 multimap<FitnessValueType, _Chromosome> probabilities;
 
-                unsigned int size = this->generation.get().size();
-                const unsigned int power2N = 1 << this->generation.get()[0].get().size();
+                unsigned int size = this->generation.size();
+                const unsigned int power2N = 1 << this->generation[0].size();
 
                 /** Random value used to draw chromosome */
                 FitnessValueType random = 0;
@@ -170,7 +170,7 @@ namespace genetic {
 
                 normalizedFitness = this->normalizeFitness(
                     this->calculateGenerationFitness(this->generation),
-                    this->generation.get()[0].get().size()
+                    this->generation[0].size()
                 );
 
                 return spinRoulette(normalizedFitness);