12 if (numberOfSites != getNumberOfSites() || (usePatterns_ && numberOfSites != numberOfDistinctSites_))
16 numberOfDistinctSites_ = numberOfSites;
19 unique_ptr<mapTree::EdgeIterator> nIT = allEdgesIterator();
21 for ( ; !nIT->end(); nIT->next())
23 (**nIT)->setNumberOfSites(numberOfSites);
30 if (numberOfSites != getNumberOfSites() || (usePatterns_ && numberOfSites != numberOfDistinctSites_))
32 numberOfDistinctSites_ = numberOfSites;
38 unique_ptr<mapTree::EdgeIterator> nIT = allEdgesIterator();
39 for ( ; !nIT->end(); nIT->next())
41 (**nIT)->setNumberOfSitesAndTypes(numberOfDistinctSites_, numberOfTypes);
51 unique_ptr<mapTree::EdgeIterator> nIT = allEdgesIterator();
52 for ( ; !nIT->end(); nIT->next())
54 (**nIT)->setNumberOfTypes(numberOfTypes);
61 unique_ptr<mapTree::EdgeIterator> nIT = allEdgesIterator();
62 size_t nT = (**nIT)->getNumberOfTypes();
65 auto count_i = counts.begin();
66 for ( ; !nIT->end(); nIT->next())
68 for (
size_t t = 0; t < nT; t++)
70 (*count_i)[t] = (***nIT)(siteIndex, t);
virtual void setNumberOfSites(size_t numberOfSites)
virtual void setNumberOfSubstitutionTypes(size_t numberOfTypes)
void setNumberOfSites(size_t numberOfSites) override
void setNumberOfSitesAndTypes(size_t numberOfSites, size_t numberOfTypes)
void setNumberOfSubstitutionTypes(size_t numberOfTypes) override
void fillMappingVectorForSite(size_t siteIndex, VVdouble &counts) const
Fill a VVdouble with the counts at a given site. The 1st coordinate of this VVdouble correspond to ed...
Defines the basic types of data flow nodes.
std::vector< Vdouble > VVdouble