bpp-popgen3  3.0.0
bpp::MonoAlleleMonolocusGenotype Class Reference

The MonoAlleleMonolocusGenotype class. More...

#include <Bpp/PopGen/MonoAlleleMonolocusGenotype.h>

+ Inheritance diagram for bpp::MonoAlleleMonolocusGenotype:
+ Collaboration diagram for bpp::MonoAlleleMonolocusGenotype:

Public Member Functions

 MonoAlleleMonolocusGenotype (size_t alleleIndex)
 Build a monolocus genotype containing one allele. More...
 
 MonoAlleleMonolocusGenotype (std::vector< size_t > alleleIndex)
 Build a monolocus genotype containing one allele. More...
 
 MonoAlleleMonolocusGenotype (const MonoAlleleMonolocusGenotype &mmg)
 Copy constructor. More...
 
virtual ~MonoAlleleMonolocusGenotype ()=default
 Destroy the MonoAlleleMonolocusGenotype. More...
 
MonoAlleleMonolocusGenotypeoperator= (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 override
 Get the alleles' index. More...
 
The Clonable interface:
MonoAlleleMonolocusGenotypeclone () const override
 

Private Attributes

size_t alleleIndex_
 

Detailed Description

The MonoAlleleMonolocusGenotype class.

Author
Sylvain Gaillard

Definition at line 20 of file MonoAlleleMonolocusGenotype.h.

Constructor & Destructor Documentation

◆ MonoAlleleMonolocusGenotype() [1/3]

MonoAlleleMonolocusGenotype::MonoAlleleMonolocusGenotype ( size_t  alleleIndex)

Build a monolocus genotype containing one allele.

Definition at line 12 of file MonoAlleleMonolocusGenotype.cpp.

Referenced by clone().

◆ MonoAlleleMonolocusGenotype() [2/3]

MonoAlleleMonolocusGenotype::MonoAlleleMonolocusGenotype ( std::vector< size_t >  alleleIndex)

Build a monolocus genotype containing one allele.

Definition at line 15 of file MonoAlleleMonolocusGenotype.cpp.

References alleleIndex_.

◆ MonoAlleleMonolocusGenotype() [3/3]

MonoAlleleMonolocusGenotype::MonoAlleleMonolocusGenotype ( const MonoAlleleMonolocusGenotype mmg)

Copy constructor.

Definition at line 22 of file MonoAlleleMonolocusGenotype.cpp.

◆ ~MonoAlleleMonolocusGenotype()

virtual bpp::MonoAlleleMonolocusGenotype::~MonoAlleleMonolocusGenotype ( )
virtualdefault

Member Function Documentation

◆ clone()

MonoAlleleMonolocusGenotype* bpp::MonoAlleleMonolocusGenotype::clone ( ) const
inlineoverridevirtual

◆ getAlleleIndex()

std::vector< size_t > MonoAlleleMonolocusGenotype::getAlleleIndex ( ) const
overridevirtual

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.

Returns
A vector of size_t.

The size of the vector corresponds to the number of alleles at this locus.

Implements bpp::MonolocusGenotypeInterface.

Definition at line 38 of file MonoAlleleMonolocusGenotype.cpp.

References alleleIndex_.

Referenced by operator=(), and operator==().

◆ operator=()

MonoAlleleMonolocusGenotype & MonoAlleleMonolocusGenotype::operator= ( const MonoAlleleMonolocusGenotype mmg)

The affectation operator.

Definition at line 27 of file MonoAlleleMonolocusGenotype.cpp.

References alleleIndex_, and getAlleleIndex().

◆ operator==()

bool MonoAlleleMonolocusGenotype::operator== ( const MonoAlleleMonolocusGenotype mmg) const
virtual

The == operator.

Definition at line 33 of file MonoAlleleMonolocusGenotype.cpp.

References alleleIndex_, and getAlleleIndex().

Member Data Documentation

◆ alleleIndex_

size_t bpp::MonoAlleleMonolocusGenotype::alleleIndex_
private

The documentation for this class was generated from the following files: