bpp-popgen3
3.0.0
|
The BiAlleleMonolocusGenotype class. More...
#include <Bpp/PopGen/BiAlleleMonolocusGenotype.h>
Public Member Functions | |
BiAlleleMonolocusGenotype (size_t firstAlleleIndex, size_t secondAlleleIndex) | |
Build a monolocus genotype containing two alleles. More... | |
BiAlleleMonolocusGenotype (std::vector< size_t > alleleIndex) | |
Build a monolocus genotype containing two alleles. More... | |
BiAlleleMonolocusGenotype (const BiAlleleMonolocusGenotype &bmg) | |
Copy constructor. More... | |
virtual | ~BiAlleleMonolocusGenotype () |
Destroy the BiAlleleMonolocusGenotype. More... | |
BiAlleleMonolocusGenotype & | operator= (const BiAlleleMonolocusGenotype &bmg) |
The affectation operator. More... | |
bool | operator== (const BiAlleleMonolocusGenotype &bmg) const |
The == operator. More... | |
size_t | getFirstAlleleIndex () const |
Get the first allele index. More... | |
size_t | getSecondAlleleIndex () const |
Get the second allele index. More... | |
bool | isHomozygous () const |
Test the homozygozity of the locus. More... | |
The MonolocusGenotype interface: | |
std::vector< size_t > | getAlleleIndex () const override |
Get the alleles' index. More... | |
The Clonable interface: | |
BiAlleleMonolocusGenotype * | clone () const override |
Private Attributes | |
std::vector< size_t > | alleleIndex_ |
The BiAlleleMonolocusGenotype class.
Definition at line 24 of file BiAlleleMonolocusGenotype.h.
BiAlleleMonolocusGenotype::BiAlleleMonolocusGenotype | ( | size_t | firstAlleleIndex, |
size_t | secondAlleleIndex | ||
) |
Build a monolocus genotype containing two alleles.
Definition at line 12 of file BiAlleleMonolocusGenotype.cpp.
References alleleIndex_.
Referenced by clone().
BiAlleleMonolocusGenotype::BiAlleleMonolocusGenotype | ( | std::vector< size_t > | alleleIndex | ) |
Build a monolocus genotype containing two alleles.
Definition at line 20 of file BiAlleleMonolocusGenotype.cpp.
References alleleIndex_.
BiAlleleMonolocusGenotype::BiAlleleMonolocusGenotype | ( | const BiAlleleMonolocusGenotype & | bmg | ) |
Copy constructor.
Definition at line 29 of file BiAlleleMonolocusGenotype.cpp.
References alleleIndex_, and getAlleleIndex().
|
virtual |
Destroy the BiAlleleMonolocusGenotype.
Definition at line 40 of file BiAlleleMonolocusGenotype.cpp.
References alleleIndex_.
|
inlineoverridevirtual |
Implements bpp::MonolocusGenotypeInterface.
Definition at line 105 of file BiAlleleMonolocusGenotype.h.
References BiAlleleMonolocusGenotype().
|
inlineoverridevirtual |
Get the alleles' index.
The alleles' index are the position of the AlleleInfo in a LocusInfo object. If no LocusInfo is used, the index are just numbers to identify the alleles.
The size of the vector corresponds to the number of alleles at this locus.
Implements bpp::MonolocusGenotypeInterface.
Definition at line 93 of file BiAlleleMonolocusGenotype.h.
References alleleIndex_.
Referenced by BiAlleleMonolocusGenotype(), operator=(), and operator==().
|
inline |
Get the first allele index.
Definition at line 67 of file BiAlleleMonolocusGenotype.h.
References alleleIndex_.
|
inline |
Get the second allele index.
Definition at line 75 of file BiAlleleMonolocusGenotype.h.
References alleleIndex_.
|
inline |
Test the homozygozity of the locus.
Definition at line 83 of file BiAlleleMonolocusGenotype.h.
References alleleIndex_.
BiAlleleMonolocusGenotype & BiAlleleMonolocusGenotype::operator= | ( | const BiAlleleMonolocusGenotype & | bmg | ) |
The affectation operator.
Definition at line 47 of file BiAlleleMonolocusGenotype.cpp.
References alleleIndex_, and getAlleleIndex().
bool BiAlleleMonolocusGenotype::operator== | ( | const BiAlleleMonolocusGenotype & | bmg | ) | const |
The == operator.
Definition at line 56 of file BiAlleleMonolocusGenotype.cpp.
References alleleIndex_, and getAlleleIndex().
|
private |
Definition at line 28 of file BiAlleleMonolocusGenotype.h.
Referenced by BiAlleleMonolocusGenotype(), getAlleleIndex(), getFirstAlleleIndex(), getSecondAlleleIndex(), isHomozygous(), operator=(), operator==(), and ~BiAlleleMonolocusGenotype().