| libsequence
    1.9.5
    | 
Track character state occurrence at a site in a VariantMatrix. More...
#include <StateCounts.hpp>
| Public Member Functions | |
| StateCounts (const std::int8_t refstate_) | |
| void | operator() (ConstRowView &) | 
| void | operator() (const RowView &) | 
| Public Attributes | |
| std::vector< std::int32_t > | counts | 
| Keep track of (state, count) pairs. | |
| std::size_t | max_allele_idx | 
| The max allelic value seen. | |
| std::uint32_t | n | 
| The sample size at this site. Excluded missing data. | |
| std::int8_t | refstate | 
| Static Public Attributes | |
| static constexpr VariantMatrix::value_type | max_allele = std::numeric_limits<VariantMatrix::value_type>::max() | 
Track character state occurrence at a site in a VariantMatrix.
This class keeps track of how many times each character state occurs at a variable site in a VariantMatrix. All missing data (negative state values) are considered equivalent and collapsed into the single missing value of -1.
When constructed, the sample size at a site is considered to be the sum of the number of occurrences of all non-missing states.
Definition at line 11 of file StateCounts.hpp.
| Sequence::StateCounts::StateCounts | ( | const std::int8_t | refstate_ | ) | 
Construct with a ConstRowView and a reference state, which defaults to 0.
Definition at line 13 of file StateCounts.cc.
| std::int8_t Sequence::StateCounts::refstate | 
The reference state for this site. Needed for certain summary statistics. Default is -1 (missing).
Definition at line 34 of file StateCounts.hpp.