*/
vector<_Chromosome> chromosomes;
+ template<typename> friend class Generation;
public:
/**
* Default constructor
/** Copy constructor */
Generation(const Generation& generation)
- : chromosomes(generation.get()) {
- }
-
- /**
- * Allows read-only access to Generation Chromosomes
- */
- vector<_Chromosome> get() const {
- return this->chromosomes;
+ : chromosomes(generation.chromosomes) {
}
/**
* @return Generation instance containing copied Chromosomes
*/
Generation& operator=(const Generation& generation){
- this->chromosomes = generation.get();
+ this->chromosomes = generation.chromosomes;
return *this;
}