5 #ifndef BPP_PHYL_LEGACY_LIKELIHOOD_DRASRTREELIKELIHOODDATA_H
6 #define BPP_PHYL_LEGACY_LIKELIHOOD_DRASRTREELIKELIHOODDATA_H
10 #include "../../Model/SubstitutionModel.h"
11 #include "../../SitePatterns.h"
93 mutable std::map<int, DRASRTreeLikelihoodNodeData>
nodeData_;
171 int id = it.second.getNode()->getId();
172 it.second.setNode(
tree_->getNode(
id));
207 return nodeData_[nodeId].getLikelihoodArray();
212 return nodeData_[nodeId].getDLikelihoodArray();
217 return nodeData_[nodeId].getD2LikelihoodArray();
Partial implementation of the TreeLikelihoodData interface.
AbstractTreeLikelihoodData & operator=(const AbstractTreeLikelihoodData &atd)
std::vector< size_t > rootPatternLinks_
Links between sites and patterns.
std::shared_ptr< const TreeTemplate< Node > > tree_
discrete Rate Across Sites, (simple) Recursive likelihood data structure.
DRASRTreeLikelihoodData(std::shared_ptr< const TreeTemplate< Node >> tree, size_t nbClasses, bool usePatterns=true)
std::shared_ptr< AlignmentDataInterface > shrunkData_
size_t getArrayPosition(int parentId, int sonId, size_t currentPosition) const
size_t getNumberOfSites() const
size_t getArrayPosition(int parentId, int sonId, size_t currentPosition)
size_t getNumberOfClasses() const
DRASRTreeLikelihoodData & operator=(const DRASRTreeLikelihoodData &data)
const DRASRTreeLikelihoodNodeData & getNodeData(int nodeId) const
VVVdouble & getDLikelihoodArray(int nodeId)
virtual std::unique_ptr< SitePatterns > initLikelihoodsWithPatterns(const Node *node, const AlignmentDataInterface &sequences, const TransitionModelInterface &model)
This method initializes the leaves according to a sequence file.
void initLikelihoods(const AlignmentDataInterface &sites, const TransitionModelInterface &model)
std::map< int, std::map< int, std::vector< size_t > > > patternLinks_
This map defines the pattern network.
size_t getRootArrayPosition(size_t currentPosition) const
std::vector< size_t > & getArrayPositions(int parentId, int sonId)
const std::vector< size_t > & getArrayPositions(int parentId, int sonId) const
virtual ~DRASRTreeLikelihoodData()
size_t getNumberOfDistinctSites() const
size_t getNumberOfStates() const
DRASRTreeLikelihoodData * clone() const
VVVdouble & getLikelihoodArray(int nodeId)
void setTree(std::shared_ptr< const TreeTemplate< Node >> tree)
Set the tree associated to the data.
DRASRTreeLikelihoodData(const DRASRTreeLikelihoodData &data)
VVVdouble & getD2LikelihoodArray(int nodeId)
std::map< int, DRASRTreeLikelihoodNodeData > nodeData_
This contains all likelihood values used for computation.
DRASRTreeLikelihoodNodeData & getNodeData(int nodeId)
Likelihood data structure for a node.
const VVVdouble & getDLikelihoodArray() const
DRASRTreeLikelihoodNodeData * clone() const
const VVVdouble & getLikelihoodArray() const
VVVdouble nodeD2Likelihoods_
VVVdouble nodeLikelihoods_
DRASRTreeLikelihoodNodeData(const DRASRTreeLikelihoodNodeData &data)
void setNode(const Node *node)
Set the node associated to this data.
VVVdouble & getLikelihoodArray()
DRASRTreeLikelihoodNodeData & operator=(const DRASRTreeLikelihoodNodeData &data)
DRASRTreeLikelihoodNodeData()
VVVdouble & getD2LikelihoodArray()
VVVdouble & getDLikelihoodArray()
const VVVdouble & getD2LikelihoodArray() const
const Node * getNode() const
Get the node associated to this data structure.
VVVdouble nodeDLikelihoods_
The phylogenetic node class.
Interface for all transition models.
TreeLikelihood partial data structure.
The phylogenetic tree class.
Defines the basic types of data flow nodes.
std::vector< VVdouble > VVVdouble