5 #ifndef BPP_PHYL_LIKELIHOOD_DATAFLOW_PROCESSTREE_H
6 #define BPP_PHYL_LIKELIHOOD_DATAFLOW_PROCESSTREE_H
24 class CollectionNodes;
48 std::shared_ptr<ConfiguredParameter>
brlen_;
50 std::shared_ptr<ConfiguredModel>
model_;
60 std::shared_ptr<NumericConstant<size_t>>
nMod_;
74 std::shared_ptr<ConfiguredParameter> brlen,
75 std::shared_ptr<ConfiguredModel>
model,
109 void setBrLen(std::shared_ptr<ConfiguredParameter> brlen)
134 std::shared_ptr<NumericConstant<size_t>>
getNMod()
179 const std::string& suff);
197 throw Exception(
"ProcessTree::clone should not be called.");
203 throw Exception(
"ProcessTree::ProcessTree should not be called.");
208 throw Exception(
"ProcessTree::operator= should not be called.");
240 std::shared_ptr<const SubstitutionProcessInterface> process,
242 const std::string& suff =
"");
272 for (
auto nMod:vnMod)
276 modelColl.
addObject(ConfiguredParametrizable::createConfigured<BranchModelInterface, ConfiguredModel>(context, *mod, parList, (nMod == 1 ?
"" :
"_" +
TextTools::toString(nMod))), nMod);
const std::shared_ptr< TreeGraphImpl > getGraph() const
Context for dataflow node construction.
void addObject(std::shared_ptr< N > object, size_t objectIndex)
PhyloTree with Parametrizable Phylo Branches. They SHARE their branch length parameters.
Tree Organization of Computing Nodes.
ProcessEdge(uint speciesIndex, std::shared_ptr< ConfiguredParameter > brlen, std::shared_ptr< ConfiguredModel > model, std::shared_ptr< NumericConstant< size_t >> nMod=0)
Construction with model and brlen.
std::shared_ptr< ConfiguredParameter > brlen_
Model & BrLen, = 0 if not supporting a model.
ValueRef< double > brprob_
Probability of the edge, used in case of mixture models.
std::shared_ptr< NumericConstant< size_t > > nMod_
Optional number of submodels, in case model_ is mixed and a submodel is used.
void setTransitionMatrix(ValueRef< Eigen::MatrixXd > transitionMatrix)
ValueRef< double > getProba()
std::shared_ptr< ConfiguredModel > model_
std::shared_ptr< ConfiguredParameter > getBrLen()
ConfiguredModel & model()
uint getSpeciesIndex() const
void setBrLen(std::shared_ptr< ConfiguredParameter > brlen)
ProcessEdge(uint speciesIndex, ValueRef< double > brprob)
Construction with probability ref from Mixture model.
ProcessEdge(const ProcessEdge &edge)
Copy construction.
std::shared_ptr< ConfiguredModel > getModel()
ValueRef< Eigen::MatrixXd > transitionMatrix_
std::shared_ptr< NumericConstant< size_t > > getNMod()
const Speciesindex speciesIndex_
the index of the species in the phyloTree matching this node.
ValueRef< Eigen::MatrixXd > getTransitionMatrix()
ProcessTree & operator=(const ProcessTree &pTree)
const ParameterList getParameters()
static std::shared_ptr< ProcessTree > makeProcessTree(Context &context, std::shared_ptr< const SubstitutionProcessInterface > process, ParameterList &parList, const std::string &suff="")
Create a Process Tree following a Substitution Process. Tree Node parameters are got from ConfiguredP...
bool matchParametersValues(ParameterList &)
ProcessTree * clone() const override
ProcessTree(Context &context, const ParametrizablePhyloTree &tree)
Build a ProcessTree with same topology as a given ParametrizablePhyloTree, and new ConfiguredParamete...
DAGindexes getDAGEdgesIndexes(const Speciesindex speciesIndex) const
ProcessTree(const ProcessTree &pTree)
This interface describes the substitution process along the tree and sites of the alignment.
virtual std::shared_ptr< const BranchModelInterface > getModel(size_t i) const =0
virtual std::vector< size_t > getModelNumbers() const =0
std::string toString(T t)
Defines the basic types of data flow nodes.
std::shared_ptr< Value< T > > ValueRef
Shared pointer alias for Value<T>.
std::vector< uint > DAGindexes
Helper: create a map with mutable dataflow nodes for each branch of the tree. The map is indexed by b...
ProcessComputationNode ProcessNode
std::shared_ptr< ProcessNode > ProcessNodePtr
ParametrizableCollection< ConfiguredModel > makeConfiguredModelCollection(Context &context, const SubstitutionProcessInterface &process, ParameterList &parList)
Make a Collection of ConfiguredModel, from the models described in the SubstitutionProcess,...
std::shared_ptr< ProcessEdge > ProcessEdgePtr