bpp-phyl3  3.0.0
ProbabilisticRewardMapping.cpp
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: The Bio++ Development Group
2 //
3 // SPDX-License-Identifier: CECILL-2.1
4 
6 
7 using namespace bpp;
8 
10 {
12  for (size_t i = 0; i < getNumberOfSites(); i++)
13  {
14  mapping_[i].resize(getNumberOfBranches());
15  }
16 }
17 
19 {
21  mapping_.resize(numberOfSites);
22  for (size_t i = 0; i < numberOfSites; i++)
23  {
24  mapping_[i].resize(getNumberOfBranches());
25  }
26 }
size_t getNumberOfSites() const override
Definition: Mapping.h:158
void setTree(const Tree &tree)
Definition: Mapping.h:138
virtual void setNumberOfSites(size_t numberOfSites)
Definition: Mapping.h:164
const TreeTemplate< Node > & tree() const override
Definition: Mapping.h:132
size_t getNumberOfBranches() const override
Definition: Mapping.h:160
virtual void setNumberOfSites(size_t numberOfSites) override
std::vector< std::vector< double > > mapping_
Rewards storage.
virtual void setTree(const Tree &tree)
(Re)-set the phylogenetic tree associated to this mapping.
Interface for phylogenetic tree objects.
Definition: Tree.h:115
Defines the basic types of data flow nodes.