bpp-popgen  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 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...
 
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
 Get the alleles' index. More...
 
The Clonable interface:
MonoAlleleMonolocusGenotypeclone () const
 

Private Attributes

size_t allele_index_
 

Detailed Description

The MonoAlleleMonolocusGenotype class.

Author
Sylvain Gaillard

Definition at line 55 of file MonoAlleleMonolocusGenotype.h.

Constructor & Destructor Documentation

◆ MonoAlleleMonolocusGenotype() [1/3]

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() [2/3]

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() [3/3]

MonoAlleleMonolocusGenotype::MonoAlleleMonolocusGenotype ( const MonoAlleleMonolocusGenotype mmg)

Copy constructor.

Definition at line 56 of file MonoAlleleMonolocusGenotype.cpp.

◆ ~MonoAlleleMonolocusGenotype()

MonoAlleleMonolocusGenotype::~MonoAlleleMonolocusGenotype ( )

Destroy the MonoAlleleMonolocusGenotype.

Definition at line 61 of file MonoAlleleMonolocusGenotype.cpp.

Member Function Documentation

◆ clone()

MonoAlleleMonolocusGenotype * MonoAlleleMonolocusGenotype::clone ( ) const
virtual

Implements bpp::Clonable.

Definition at line 83 of file MonoAlleleMonolocusGenotype.cpp.

References MonoAlleleMonolocusGenotype().

◆ getAlleleIndex()

std::vector< size_t > MonoAlleleMonolocusGenotype::getAlleleIndex ( ) const
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.

Returns
A vector of size_t.

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==().

◆ operator=()

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

The affectation operator.

Definition at line 65 of file MonoAlleleMonolocusGenotype.cpp.

References allele_index_, and getAlleleIndex().

◆ operator==()

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

The == operator.

Definition at line 71 of file MonoAlleleMonolocusGenotype.cpp.

References allele_index_, and getAlleleIndex().

Member Data Documentation

◆ allele_index_

size_t bpp::MonoAlleleMonolocusGenotype::allele_index_
private

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