5 #ifndef BPP_PHYL_LIKELIHOOD_DATAFLOW_LIKELIHOODCALCULATION_ON_A_BRANCH_H
6 #define BPP_PHYL_LIKELIHOOD_DATAFLOW_LIKELIHOODCALCULATION_ON_A_BRANCH_H
83 std::vector<ForwardLikelihoodBelowRef>
vBotLik_;
87 std::vector<BackwardLikelihoodAboveRef>
vTopLik_;
96 std::shared_ptr<ConfiguredParameter>
brlen_;
157 void setModel(std::shared_ptr<ConfiguredModel> model)
170 throw bpp::Exception(
"LikelihoodCalculationOnABranch clone should not happen.");
175 return model_->targetValue()->stateMap();
180 return model_->targetValue()->getStateMap();
244 return (uint)(
rootWeights_->targetValue()(Eigen::Index(pos)));
void shareParameters_(const ParameterList ¶meters)
static ValueRef< R > create(Context &c, NodeRefVec &&deps, const Dimension< R > &dim)
Build a new CWisePattern node.
Context for dataflow node construction.
std::vector< BackwardLikelihoodAboveRef > vTopLik_
std::vector< ForwardLikelihoodBelowRef > vBotLik_
std::shared_ptr< ConfiguredParameter > brlen_
SiteLikelihoodsRef siteLik_
LikelihoodCalculationOnABranch(Context &context, LikelihoodCalculationSingleProcess &likcalsp, uint edgeId)
std::shared_ptr< const StateMapInterface > getStateMap() const
ValueRef< MatrixLik > expandMatrix(ValueRef< MatrixLik > matrix)
ValueRef< RowLik > expandVector(ValueRef< RowLik > vector)
const StateMapInterface & stateMap() const
std::shared_ptr< const Alphabet > getAlphabet() const
size_t getNumberOfDistinctSites() const
LikelihoodCalculationOnABranch * clone() const
size_t getNumberOfSites() const
void cleanAllLikelihoods()
void setModel(std::shared_ptr< ConfiguredModel > model)
size_t getRootArrayPosition(size_t currentPosition) const
std::shared_ptr< ConfiguredModel > model_
std::shared_ptr< SiteLikelihoods > getSiteLikelihoods_(size_t nCat)
AllRatesSiteLikelihoods getSiteLikelihoodsForAllClasses(bool shrunk=false)
Output array (Classes X Sites) of likelihoods for all sites & classes.
unsigned int getWeight(size_t pos) const
std::vector< RateCategoryEdge > vRateCatEdges_
std::shared_ptr< SiteWeights > rootWeights_
The frequency of each site.
MatrixDimension likelihoodMatrixDim_
std::shared_ptr< ConfiguredModel > getModel()
RowLik getSiteLikelihoodsForAClass(size_t nCat, bool shrunk=false)
Get site likelihoods for a rate category.
const PatternType & getRootArrayPositions() const
std::shared_ptr< SiteWeights > getRootWeights()
ValueRef< PatternType > rootPatternLinks_
ValueRef< Eigen::RowVectorXd > catProb_
Map the states of a given alphabet which have a model state.
virtual std::shared_ptr< const Alphabet > getAlphabet() const =0
Defines the basic types of data flow nodes.
std::shared_ptr< Value< T > > ValueRef
Shared pointer alias for Value<T>.
ExtendedFloatMatrixXd MatrixLik
ValueRef< MatrixLik > ForwardLikelihoodBelowRef
Eigen::Matrix< size_t, -1, 1 > PatternType
ValueRef< RowLik > SiteLikelihoodsRef
ValueRef< MatrixLik > BackwardLikelihoodAboveRef
Basic matrix dimension type.