A library for working with phylogenetic and population genetic data.
v0.32.0
SortedSampleCounts Struct Reference

#include <genesis/population/sample_counts.hpp>

Detailed Description

Ordered array of sample counts for the four nucleotides.

Some functions need the bases sorted by their count. This structure is used to keep that data, with the highest count base first.

Definition at line 110 of file sample_counts.hpp.

Public Member Functions

 SortedSampleCounts ()=default
 
 SortedSampleCounts (char b0, size_t c0, char b1, size_t c1, char b2, size_t c2, char b3, size_t c3)
 
BaseCountoperator[] (size_t index)
 
BaseCount const & operator[] (size_t index) const
 

Public Attributes

std::array< BaseCount, 4 > data
 

Classes

struct  BaseCount
 Combination of a nucleotide base and its count. More...
 

Constructor & Destructor Documentation

◆ SortedSampleCounts() [1/2]

SortedSampleCounts ( )
default

◆ SortedSampleCounts() [2/2]

SortedSampleCounts ( char  b0,
size_t  c0,
char  b1,
size_t  c1,
char  b2,
size_t  c2,
char  b3,
size_t  c3 
)
inline

Definition at line 133 of file sample_counts.hpp.

Member Function Documentation

◆ operator[]() [1/2]

BaseCount& operator[] ( size_t  index)
inline

Definition at line 141 of file sample_counts.hpp.

◆ operator[]() [2/2]

BaseCount const& operator[] ( size_t  index) const
inline

Definition at line 146 of file sample_counts.hpp.

Member Data Documentation

◆ data

std::array<BaseCount, 4> data

Definition at line 151 of file sample_counts.hpp.


The documentation for this struct was generated from the following file: