5 #ifndef BPP_PHYL_LIKELIHOOD_MODELPATH_H
6 #define BPP_PHYL_LIKELIHOOD_MODELPATH_H
11 #include "../Model/MixedTransitionModel.h"
108 std::shared_ptr<MixedTransitionModelInterface>
leadMod_;
134 const std::shared_ptr<MixedTransitionModelInterface>
getLeadModel()
const
144 void setLeadModel(std::shared_ptr<MixedTransitionModelInterface> model)
147 throw Exception(
"ModelPath::setLeadModel: Unknown model " + model->getName());
158 void setModel(std::shared_ptr<MixedTransitionModelInterface> mMod,
const Vuint& vnS);
168 void changeModel(std::shared_ptr<MixedTransitionModelInterface> mMod1,
169 std::shared_ptr<MixedTransitionModelInterface> mMod2);
176 void removeModel(std::shared_ptr<MixedTransitionModelInterface> mMod)
192 void addToModel(std::shared_ptr<MixedTransitionModelInterface> mMod,
const Vuint& vnS);
235 bool hasModel(std::shared_ptr<MixedTransitionModelInterface> mMod)
const
238 bool hasModel(std::shared_ptr<const MixedTransitionModelInterface> mMod)
const
242 if (mn.first == mMod)
258 if (mn.first == mMod)
261 throw Exception(
"ModelPath::getPathNode : unknown model " + mMod->getName());
267 std::vector<std::shared_ptr<MixedTransitionModelInterface>>
getModels()
const;
A vector<int> where all elements are different and in INCREASING ORDER. So inclusion should be done t...
void insertN(const Vuint &vn)
Insert elements.
PathNode & operator+=(const PathNode &n)
Cumulates the elements of the given PathNode into this one.
bool operator>=(const PathNode &) const
checks if this PathNode includes another one.
PathNode & operator=(const Vuint &vn)
bool intersects(const PathNode &) const
checks if this PathNode intersects another one.
void removeN(const Vuint &vn)
Remove elements.
bool operator<=(const PathNode &) const
checks if this PathNode is included in another one.
PathNode & operator-=(const PathNode &n)
Remove the elements of the given PathNode from this one.
PathNode(const PathNode &n)
std::string to_string() const
Output.
Organization of submodels in mixed substitution models in a path. See class ModelScenario for a thoro...
ModelPath & operator-=(const ModelPath &)
Remove from the PathNodes of this object the matching ones of the ModelPath.
std::shared_ptr< MixedTransitionModelInterface > getLeadModel()
gets the leader model.
std::shared_ptr< MixedTransitionModelInterface > leadMod_
bool intersects(const ModelPath &) const
checks if this ModelPath intersects another one. Which means that one submodel explicitly declared in...
void removeModel(std::shared_ptr< MixedTransitionModelInterface > mMod)
Remove a model.
const std::shared_ptr< MixedTransitionModelInterface > getLeadModel() const
std::string toString() const
string description
std::map< std::shared_ptr< MixedTransitionModelInterface >, PathNode > mModPath_
const PathNode & getPathNode(std::shared_ptr< MixedTransitionModelInterface > mMod) const
gets the pathnode associated with a model
double getProbability() const
returns the probability
void setProbability(double x)
sets the probability
void changeModel(std::shared_ptr< MixedTransitionModelInterface > mMod1, std::shared_ptr< MixedTransitionModelInterface > mMod2)
change from a model to another
ModelPath & operator=(const ModelPath &)
std::vector< std::shared_ptr< MixedTransitionModelInterface > > getModels() const
gets the MixedTransitionModel used in the ModelPath
void setModel(std::shared_ptr< MixedTransitionModelInterface > mMod, const Vuint &vnS)
sets submodel numbers in the mixed model. Checks if all the numbers are valid.
bool hasModel(std::shared_ptr< MixedTransitionModelInterface > mMod) const
checks if there is a pathnode associated with a model
ModelPath & operator+=(const ModelPath &)
Cumulates the PathNodes of the given ModelPath into this one.
void addToModel(std::shared_ptr< MixedTransitionModelInterface > mMod, const Vuint &vnS)
adds submodel numbers to the mixed model. Checks if all the numbers are valid.
void setLeadModel(std::shared_ptr< MixedTransitionModelInterface > model)
sets the leader model.
bool operator<=(const ModelPath &) const
checks if this ModelPath is included in another one. Which means that all submodels of this path are ...
double proba_
probability of this ModelPath.
bool hasModel(std::shared_ptr< const MixedTransitionModelInterface > mMod) const
const PathNode & getPathNode(std::shared_ptr< const MixedTransitionModelInterface > mMod) const
bool operator>=(const ModelPath &) const
checks if this ModelPath includes another one.
Defines the basic types of data flow nodes.
std::vector< unsigned int > Vuint