Пример #1
0
        public void CrossoverTest()
        {
            UInt32 sequence = Convert.ToUInt32("01010101010101010101010101010101", 2);

            Gene gene1 = new Gene(sequence);
            Gene gene2 = new Gene(Convert.ToUInt32("10101010101010101010101010101010", 2));

            Gene newGene = gene1.Crossover(gene2);

            Assert.AreNotEqual(gene1.Sequence, newGene.Sequence);
            Assert.AreNotEqual(gene2.Sequence, newGene.Sequence);
        }