Skip to content

Commit

Permalink
Simplify num_genotypes expression
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Cooke committed Sep 29, 2020
1 parent b82d319 commit b83ce11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/types/genotype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Genotype<Haplotype> remap(const Genotype<Haplotype>& genotype, const GenomicRegi

std::size_t num_genotypes(const unsigned num_elements, const unsigned ploidy)
{
return boost::math::binomial_coefficient<double>(num_elements + ploidy - 1, num_elements - 1);
return boost::math::binomial_coefficient<double>(num_elements + ploidy - 1, ploidy);
}

boost::optional<std::size_t> num_genotypes_noexcept(const unsigned num_elements, const unsigned ploidy) noexcept
Expand Down

0 comments on commit b83ce11

Please sign in to comment.