Beispiel #1
0
 public BitIndividual(List <bool> lst, int epoch) : this(epoch)
 {
     foreach (bool b in lst)
     {
         BitGene newGene = new BitGene(b);
         chromosome.Add(newGene);
     }
 }
Beispiel #2
0
 public BitIndividual(String str, int epoch) : this(epoch)
 {
     foreach (char c in str)
     {
         if (c != '1' && c != '0')
         {
             return;
         }
     }
     foreach (char c in str)
     {
         BitGene newGene = new BitGene(c);
         chromosome.Add(newGene);
     }
 }