コード例 #1
0
 public ByteChromosome(int length, Genes.ByteGeneFactory byteFactory)
 {
     this.length = length;
     this.bytes = new Genes.ByteGene[this.length];
     for (int i = 0; i < this.length; ++i)
         this.bytes[i] = (Genes.ByteGene)byteFactory.GetNewGene();
 }
コード例 #2
0
 public BitChromosome(int length, Genes.BitGeneFactory bitGeneFactory)
 {
     this.length = length;
     this.bits = new Genes.BitGene[this.length];
     for (int i = 0; i < this.length; ++i)
         this.bits[i] = (Genes.BitGene)bitGeneFactory.GetNewGene();
 }
コード例 #3
0
 public DoubleChromosome(int length, Genes.DoubleGeneFactory doubleGeneFactory)
 {
     this.length = length;
     this.doubleValues = new Genes.DoubleGene[this.length];
     for (int i = 0; i < this.length; ++i)
         this.doubleValues[i] = (Genes.DoubleGene)doubleGeneFactory.GetNewGene();
 }