1 #include <Sequence/VariantMatrix.hpp> 2 #include <Sequence/VariantMatrixViews.hpp> 3 #include <Sequence/StateCounts.hpp> 9 = std::numeric_limits<std::int8_t>::min();
14 return data[site *
nsam + haplotype];
19 const std::size_t haplotype)
const 21 return data[site *
nsam + haplotype];
30 throw std::out_of_range(
31 "VariantMatrix::at -- index out of range");
33 return data.at(site *
nsam + haplotype);
38 const std::size_t haplotype)
const 42 throw std::out_of_range(
43 "VariantMatrix::at -- index out of range");
45 return data.at(site *
nsam + haplotype);
The namespace in which this library resides.
std::int8_t & at(const std::size_t site, const std::size_t haplotype)
Get data from marker site and haplotype haplotype. std::out_of_range is thrown if indexes are invalid...
std::size_t nsites
Number of sites in data set.
std::size_t nsam
Sample size of data set.
std::int8_t & get(const std::size_t site, const std::size_t haplotype)
Get data from marker site and haplotype haplotype. No range-checking is done.
std::vector< std::int8_t > data
Data stored in matrix form with rows as sites.
static const std::int8_t mask
Reserved value for masked data.