GAAlleleSetArray<T>::GAAlleleSetArray(const GAAlleleSetArray<T>& orig) : csz(orig.csz), sz(orig.sz), SZ(orig.SZ), aset(new GAAlleleSet<T> * [orig.SZ]) { for(unsigned int i = 0; i < sz; i++) { aset[i] = new GAAlleleSet<T>(orig.set(i)); } }
GA1DArrayAlleleGenome<float>:: GA1DArrayAlleleGenome(const GAAlleleSetArray<float> & sa, GAGenome::Evaluator f, void * u) : GA1DArrayGenome<float>(sa.size(), f, u){ naset = sa.size(); aset = new GAAlleleSet<float>[naset]; for(int i=0; i<naset; i++) aset[i] = sa.set(i); initializer(DEFAULT_REAL_INITIALIZER); mutator(DEFAULT_REAL_MUTATOR); comparator(DEFAULT_REAL_COMPARATOR); crossover(DEFAULT_REAL_CROSSOVER); }
GA3DArrayAlleleGenome<T>:: GA3DArrayAlleleGenome(unsigned int w, unsigned int h, unsigned int d, const GAAlleleSetArray<T> & sa, GAGenome::Evaluator f, void * u) : GA3DArrayGenome<T>(w,h,d, f, u) { naset = sa.size(); aset = new GAAlleleSet<T>[naset]; for(int i=0; i<naset; i++) aset[i] = sa.set(i); initializer(DEFAULT_3DARRAY_ALLELE_INITIALIZER); mutator(DEFAULT_3DARRAY_ALLELE_MUTATOR); comparator(DEFAULT_3DARRAY_ALLELE_COMPARATOR); crossover(DEFAULT_3DARRAY_ALLELE_CROSSOVER); }