public IChromosome Clone() { ByteChromosome cpy = new ByteChromosome(); cpy.length = this.length; cpy.bytes = new Genes.ByteGene[cpy.length]; for (int i = 0; i < cpy.length; ++i) cpy.bytes[i] = (Genes.ByteGene)this.bytes[i].Clone(); IChromosome copy = cpy; return copy; }
public IChromosome GetNewChromosome() { IChromosome instance = new ByteChromosome(this.length, new Genes.ByteGeneFactory()); return instance; }