48 size_t first_allele_index,
49 size_t second_allele_index) : allele_index_(vector<size_t>(2))
57 if (allele_index.size() != 2)
58 throw BadSizeException(
"BiAlleleMonolocusGenotype::BiAlleleMonolocusGenotype: allele_index must contain two values.", allele_index.size(), 2);
59 allele_index_[0] = allele_index[0];
60 allele_index_[1] = allele_index[1];
65 for (
size_t i = 0; i < 2; i++)
82 for (
size_t i = 0; i < 2; i++)
BiAlleleMonolocusGenotype(size_t first_allele_index, size_t second_allele_index)
Build a monolocus genotype containing two alleles.
bool operator==(const BiAlleleMonolocusGenotype &bmg) const
The == operator.
std::vector< size_t > getAlleleIndex() const
Get the alleles' index.
~BiAlleleMonolocusGenotype()
Destroy the BiAlleleMonolocusGenotype.
size_t getSecondAlleleIndex() const
Get the second allele index.
bool isHomozygous() const
Test the homozygozity of the locus.
BiAlleleMonolocusGenotype & operator=(const BiAlleleMonolocusGenotype &bmg)
The affectation operator.
std::vector< size_t > allele_index_
BiAlleleMonolocusGenotype * clone() const
The BiAlleleMonolocusGenotype class.
size_t getFirstAlleleIndex() const
Get the first allele index.