Ejemplo n.º 1
0
 public MeiosisResult(GameteNucleus nuc1, GameteNucleus nuc2, GameteNucleus nuc3, GameteNucleus nuc4)
 {
     Nuc1 = nuc1;
     Nuc2 = nuc2;
     Nuc3 = nuc3;
     Nuc4 = nuc4;
 }
Ejemplo n.º 2
0
        public static Nucleus Fertilization(GameteNucleus nuc1, GameteNucleus nuc2)
        {
            List <Chromosome> chroms1 = nuc1.Chromosomes;
            List <Chromosome> chroms2 = nuc2.Chromosomes;

            System.Diagnostics.Debug.Assert(chroms1.Count == chroms2.Count, "Fertilization Failed: gametes have different number of chromosomes");
            List <ChromosomePair> chromosomePairs = new List <ChromosomePair>();

            for (int i = 0; i < chroms1.Count; i++)
            {
                chromosomePairs.Add(new ChromosomePair(chroms1[i], chroms2[i]));
            }
            return(new Nucleus(chromosomePairs));
        }
Ejemplo n.º 3
0
 public static bool GeneticallyEqual(GameteNucleus nuc1, GameteNucleus nuc2)
 {
     if (nuc1.Chromosomes.Count != nuc2.Chromosomes.Count)
     {
         return(false);
     }
     for (int i = 0; i < nuc1.Chromosomes.Count; i++)
     {
         if (!GeneticallyEqual(nuc1.Chromosomes[i], nuc2.Chromosomes[i]))
         {
             return(false);
         }
     }
     return(true);
 }