Finished Roulette Selection.
[genetic.git] / src / generation.h
index 8ca0eb841a975cb1c9fc2dfe3f8cc8bbf66d181c..39b9577bc4f7c855da8acdb0c2413de7dffe5721 100644 (file)
@@ -9,6 +9,9 @@
 using namespace std;
 
 namespace genetic {
+    /**
+     * Generation of given Chromosomes.
+     */
     template < typename _Chromosome >
     class Generation {
     protected:
@@ -29,6 +32,11 @@ namespace genetic {
         vector<_Chromosome> get() const {
             return this->chromosomes;
         }
+
+        Generation& operator=(const Generation& generation){
+            this->chromosomes = generation.get();
+            return *this;
+        }
     };
 }