bpp-popgen
3.0.0
|
The MonoAlleleMonolocusGenotype class. More...
#include <Bpp/PopGen/MonoAlleleMonolocusGenotype.h>
Public Member Functions | |
MonoAlleleMonolocusGenotype (size_t allele_index) | |
Build a monolocus genotype containing one allele. More... | |
MonoAlleleMonolocusGenotype (std::vector< size_t > allele_index) | |
Build a monolocus genotype containing one allele. More... | |
MonoAlleleMonolocusGenotype (const MonoAlleleMonolocusGenotype &mmg) | |
Copy constructor. More... | |
~MonoAlleleMonolocusGenotype () | |
Destroy the MonoAlleleMonolocusGenotype. More... | |
MonoAlleleMonolocusGenotype & | operator= (const MonoAlleleMonolocusGenotype &mmg) |
The affectation operator. More... | |
virtual bool | operator== (const MonoAlleleMonolocusGenotype &mmg) const |
The == operator. More... | |
The MonolocusGenotype interface: | |
std::vector< size_t > | getAlleleIndex () const |
Get the alleles' index. More... | |
The Clonable interface: | |
MonoAlleleMonolocusGenotype * | clone () const |
Private Attributes | |
size_t | allele_index_ |
The MonoAlleleMonolocusGenotype class.
Definition at line 55 of file MonoAlleleMonolocusGenotype.h.
MonoAlleleMonolocusGenotype::MonoAlleleMonolocusGenotype | ( | size_t | allele_index | ) |
Build a monolocus genotype containing one allele.
Definition at line 47 of file MonoAlleleMonolocusGenotype.cpp.
Referenced by clone().
MonoAlleleMonolocusGenotype::MonoAlleleMonolocusGenotype | ( | std::vector< size_t > | allele_index | ) |
Build a monolocus genotype containing one allele.
Definition at line 49 of file MonoAlleleMonolocusGenotype.cpp.
References allele_index_.
MonoAlleleMonolocusGenotype::MonoAlleleMonolocusGenotype | ( | const MonoAlleleMonolocusGenotype & | mmg | ) |
Copy constructor.
Definition at line 56 of file MonoAlleleMonolocusGenotype.cpp.
MonoAlleleMonolocusGenotype::~MonoAlleleMonolocusGenotype | ( | ) |
Destroy the MonoAlleleMonolocusGenotype.
Definition at line 61 of file MonoAlleleMonolocusGenotype.cpp.
|
virtual |
Implements bpp::Clonable.
Definition at line 83 of file MonoAlleleMonolocusGenotype.cpp.
References MonoAlleleMonolocusGenotype().
|
virtual |
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::MonolocusGenotype.
Definition at line 76 of file MonoAlleleMonolocusGenotype.cpp.
References allele_index_.
Referenced by operator=(), and operator==().
MonoAlleleMonolocusGenotype & MonoAlleleMonolocusGenotype::operator= | ( | const MonoAlleleMonolocusGenotype & | mmg | ) |
The affectation operator.
Definition at line 65 of file MonoAlleleMonolocusGenotype.cpp.
References allele_index_, and getAlleleIndex().
|
virtual |
The == operator.
Definition at line 71 of file MonoAlleleMonolocusGenotype.cpp.
References allele_index_, and getAlleleIndex().
|
private |
Definition at line 59 of file MonoAlleleMonolocusGenotype.h.
Referenced by getAlleleIndex(), MonoAlleleMonolocusGenotype(), operator=(), and operator==().