A library for working with phylogenetic and population genetic data.
SortedBaseCounts Struct Reference

#include <genesis/population/base_counts.hpp>

Detailed Description

Ordered array of base 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 base_counts.hpp.

Public Member Functions

 SortedBaseCounts ()=default
 SortedBaseCounts (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


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

Constructor & Destructor Documentation

◆ SortedBaseCounts() [1/2]

SortedBaseCounts ( )

◆ SortedBaseCounts() [2/2]

SortedBaseCounts ( char  b0,
size_t  c0,
char  b1,
size_t  c1,
char  b2,
size_t  c2,
char  b3,
size_t  c3 

Definition at line 133 of file base_counts.hpp.

Member Function Documentation

◆ operator[]() [1/2]

BaseCount& operator[] ( size_t  index)

Definition at line 141 of file base_counts.hpp.

◆ operator[]() [2/2]

BaseCount const& operator[] ( size_t  index) const

Definition at line 146 of file base_counts.hpp.

Member Data Documentation

◆ data

std::array<BaseCount, 4> data

Definition at line 151 of file base_counts.hpp.

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