Beispiel #1
0
 public static bool GeneticallyEqual(ChromosomePair chromPair1, ChromosomePair chromPair2)
 {
     if (!GeneticallyEqual(chromPair1.Chrom1, chromPair2.Chrom1))
     {
         return(false);
     }
     if (!GeneticallyEqual(chromPair1.Chrom2, chromPair2.Chrom2))
     {
         return(false);
     }
     return(true);
 }
Beispiel #2
0
        // http://en.wikipedia.org/wiki/Chromosomal_crossover

        static void ChromosomalCrossover(Random r, ChromosomePair chromPair)
        {
            ChromosomalCrossover(r, chromPair.Chrom1, chromPair.Chrom2);
        }
Beispiel #3
0
 static ChromosomePair DeepCopy(ChromosomePair chromPair)
 {
     return(new ChromosomePair(DeepCopy(chromPair.Chrom1), DeepCopy(chromPair.Chrom2)));
 }