14 weights_(sppm.weights_),
15 distances_(sppm.distances_),
16 counts_(sppm.counts_ ? sppm.counts_->clone() : 0),
17 factors_(sppm.factors_ ? sppm.factors_->clone() : 0),
18 modelColl_(sppm.modelColl_),
19 mModBrid_(sppm.mModBrid_)
26 for ( ; !nIT->end(); nIT->next())
31 auto sm = sppm.
getEdge(brid)->pMod_;
45 throw Exception(
"AbstractSinglePhyloSubstitutionMapping::AbstractSinglePhyloSubstitutionMapping: unable to find model for branch " +
TextTools::toString(brid));
68 for ( ; !nIT->end(); nIT->next())
73 auto sm = sppm.
getEdge(brid)->pMod_;
87 throw Exception(
"AbstractSinglePhyloSubstitutionMapping::AbstractSinglePhyloSubstitutionMapping: unable to find model for branch " +
TextTools::toString(brid));
97 modelColl_.addObject(std::shared_ptr<TransitionModelInterface>(model.
clone()), index);
102 for (
auto&
id : brIds)
104 auto mb = make_shared<ModelBranch>();
The AbstractSinglePhyloSubstitutionMapping class: substitution mapping linked with a Single Process P...
std::shared_ptr< const SubstitutionRegisterInterface > pReg_
AbstractSinglePhyloSubstitutionMapping(std::shared_ptr< TreeGlobalGraph > graph, std::shared_ptr< const SubstitutionRegisterInterface > reg, std::shared_ptr< const AlphabetIndex2 > weights, std::shared_ptr< const AlphabetIndex2 > distances)
AbstractSinglePhyloSubstitutionMapping & operator=(const AbstractSinglePhyloSubstitutionMapping &sppm)
std::shared_ptr< const AlphabetIndex2 > distances_
distances of the substitutions. If null, no distances are used.
std::shared_ptr< const AlphabetIndex2 > weights_
weights of the substitutions. If null, no weights are used.
void addModel(size_t index, const TransitionModelInterface &model, Vuint brIds)
add a Substitution Model in the map, and on all branches with given Ids.
ParametrizableCollection< TransitionModelInterface > modelColl_
A collection of Transition Models.
std::map< size_t, std::vector< uint > > mModBrid_
a map <model index, vector of branch ids>
std::unique_ptr< ProbabilisticSubstitutionMapping > counts_
std::unique_ptr< ProbabilisticSubstitutionMapping > factors_
virtual std::unique_ptr< EdgeIterator > allEdgesIterator()=0
virtual EdgeIndex getEdgeIndex(const std::shared_ptr< E > edgeObject) const=0
virtual std::shared_ptr< E > getEdge(EdgeIndex edgeIndex) const=0
virtual void associateEdge(std::shared_ptr< E > edgeObject, EdgeGraphid edge)=0
AssociationTreeGraphImplObserver< N, E, TreeGraphImpl > & operator=(bpp::AssociationTreeGraphImplObserver< N, E, TreeGraphImpl > const &treeGraphObserver)
Interface for all transition models.
TransitionModelInterface * clone() const =0
std::string toString(T t)
Defines the basic types of data flow nodes.
std::vector< unsigned int > Vuint