bpp-phyl3  3.0.0
AbstractBiblioMixedTransitionModel.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 using namespace std;
9 
10 /******************************************************************************/
11 
14  mixedModelPtr_()
15 {}
16 
19  mixedModelPtr_(mod2.mixedModelPtr_->clone())
20 {}
21 
23 {
25  mixedModelPtr_.reset(mod2.mixedModelPtr_->clone());
26  return *this;
27 }
28 
30 {}
31 
33 {
34  std::string desc2;
35 
36  StringTokenizer st(desc, ",");
37  while (st.hasMoreToken())
38  {
39  string param = st.nextToken();
40 
41  desc2 += getParameterNameWithoutNamespace(param);
42  if (st.hasMoreToken())
43  desc2 += ",";
44  }
45 
46  return mixedModel().getSubmodelNumbers(desc2);
47 }
Abstract class for mixture models based on the bibliography.
AbstractBiblioMixedTransitionModel & operator=(const AbstractBiblioMixedTransitionModel &model)
Vuint getSubmodelNumbers(const std::string &desc) const override
Returns the vector of numbers of the submodels in the mixture that match a description.
const MixedTransitionModelInterface & mixedModel() const
std::unique_ptr< MixedTransitionModelInterface > mixedModelPtr_
Partial implementation of the SubstitutionModel interface for models that are set for matching the bi...
AbstractBiblioTransitionModel & operator=(const AbstractBiblioTransitionModel &model)
virtual Vuint getSubmodelNumbers(const std::string &desc) const =0
Returns the vector of numbers of the submodels in the mixture that match a description.
virtual std::string getParameterNameWithoutNamespace(const std::string &name) const=0
const std::string & nextToken()
bool hasMoreToken() const
Defines the basic types of data flow nodes.
std::vector< unsigned int > Vuint