bpp-popgen  3.0.0
bpp::MonolocusGenotypeTools Class Reference

The MonolocusGenotypeTools static class. More...

#include <Bpp/PopGen/MonolocusGenotypeTools.h>

Static Public Member Functions

static std::unique_ptr< MonolocusGenotypebuildMonolocusGenotypeByAlleleKey (const std::vector< size_t > allele_keys)
 Build a proper MonolocusGenotype accordig to the number of alleles. More...
 

Detailed Description

The MonolocusGenotypeTools static class.

This class provides tools for MonolocusGenotype manipulation or creation.

Author
Sylvain Gaillard

Definition at line 61 of file MonolocusGenotypeTools.h.

Member Function Documentation

◆ buildMonolocusGenotypeByAlleleKey()

std::unique_ptr< MonolocusGenotype > MonolocusGenotypeTools::buildMonolocusGenotypeByAlleleKey ( const std::vector< size_t >  allele_keys)
static

Build a proper MonolocusGenotype accordig to the number of alleles.

Return a MonolocusGenotype build according to the number of allels. If one allele key, send a MonoAlleleMonolocusGenotype, if two allele keys, send a BiAlleleMonolocusGenotype, if more allele keys, send a MultiAlleleMonolocusGenotype.

Parameters
allele_keysA vector containing thes allele keys to put in the MonolocusGenotype.
Returns
A MonolocusGenotype according to the number of alleles

Definition at line 50 of file MonolocusGenotypeTools.cpp.

Referenced by bpp::MultilocusGenotype::setMonolocusGenotypeByAlleleKey().


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