pub fn probability_dominant(&self) -> f32 {
    match (&self.p1, &self.p2) {
      (Phenotype::HomozygousDominant, _) | (_, Phenotype::HomozygousDominant) => 1.0,
      (Phenotype::Heterozygous, Phenotype::Heterozygous) => 0.75,
      (Phenotype::Heterozygous, Phenotype::HomozygousRecessive)
      | (Phenotype::HomozygousRecessive, Phenotype::Heterozygous) => 0.5,
      (Phenotype::HomozygousRecessive, Phenotype::HomozygousRecessive) => 0.0,
    }
  }
/// returns the probability (0.0 - 1.0) that the resulting combination would
/// contain the dominant phenotype (i.e. Aa or AA)
returns the probability (0.0 - 1.0) that the resulting combination would
contain the dominant phenotype
returns the probability ( 0 . 0 - 1 . 0 ) that the resulting combination would contain the dominant phenotype
pub fn probability_dominant(&self) -> f32 {
    match (&self.p1, &self.p2) {
      (Phenotype::HomozygousDominant, _) | (_, Phenotype::HomozygousDominant) => 1.0,
      (Phenotype::Heterozygous, Phenotype::Heterozygous) => 0.75,
      (Phenotype::Heterozygous, Phenotype::HomozygousRecessive)
      | (Phenotype::HomozygousRecessive, Phenotype::Heterozygous) => 0.5,
      (Phenotype::HomozygousRecessive, Phenotype::HomozygousRecessive) => 0.0,
    }
  }
pub fn probability_dominant ( & self ) -> f32 { match ( & self . p1 , & self . p2 ) { ( Phenotype :: HomozygousDominant , _ ) | ( _ , Phenotype :: HomozygousDominant ) => 1.0 , ( Phenotype :: Heterozygous , Phenotype :: Heterozygous ) => 0.75 , ( Phenotype :: Heterozygous , Phenotype :: HomozygousRecessive ) | ( Phenotype :: HomozygousRecessive , Phenotype :: Heterozygous ) => 0.5 , ( Phenotype :: HomozygousRecessive , Phenotype :: HomozygousRecessive ) => 0.0 , } }
returns the probability (0.0 - 1.0) that the resulting combination would
contain the dominant phenotype (i.e.
returns the probability ( 0 . 0 - 1 . 0 ) that the resulting combination would contain the dominant phenotype ( i . e .
&self
&self