1 #ifndef SEQUENCE_ALLELE_COUNT_MATRIX_HPP 2 #define SEQUENCE_ALLELE_COUNT_MATRIX_HPP 8 #include <Sequence/VariantMatrix.hpp> 17 static std::vector<std::int32_t> init_counts(
const VariantMatrix& m);
20 const std::vector<std::int32_t> counts;
21 using value_type = std::vector<std::int32_t>::value_type;
22 const std::size_t ncol;
23 const std::size_t nrow;
24 const std::size_t nsam;
33 : counts(
std::forward<T>(t)), ncol{ nc_ }, nrow{ nr_ }, nsam{ n_ }
35 if (ncol * nrow != counts.size())
37 throw std::invalid_argument(
38 "incorrect dimensions for AlleleCountMatrix");
41 std::pair<std::vector<std::int32_t>::const_iterator,
42 std::vector<std::int32_t>::const_iterator>
43 row(
const std::size_t)
const;
The namespace in which this library resides.
Matrix representation of variation data.
AlleleCountMatrix(T &&t, const std::size_t nc_, const std::size_t nr_, const std::size_t n_)
Matrix representation of allele counts in a VariantMatrix To be constructed.