4 #ifndef SEQUENCE_SUMMSTATS_ALGORITHM_HPP 5 #define SEQUENCE_SUMMSTATS_ALGORITHM_HPP 8 #include <Sequence/VariantMatrix.hpp> 9 #include <Sequence/StateCounts.hpp> 10 #include <Sequence/VariantMatrixViews.hpp> 19 const std::int8_t refstate)
46 for (std::size_t i = 0; i < m.
nsites; ++i)
57 const std::vector<std::int8_t>& refstates)
83 if (refstates.size() != m.
nsites)
85 throw std::invalid_argument(
86 "number of reference states must equal number of " 87 "sites in VariantMatrix");
90 for (std::size_t i = 0; i < m.
nsites; ++i)
Track character state occurrence at a site in a VariantMatrix.
The namespace in which this library resides.
std::size_t nsites
Number of sites in data set.
ConstRowView get_ConstRowView(const VariantMatrix &m, const std::size_t row)
Return a ConstRowView from VariantMatrix m at row row. std::out_of_range is thrown if row is out of r...
Matrix representation of variation data.
void aggregate_sites(const VariantMatrix &m, const F &f, const std::vector< std::int8_t > &refstates)