bpp-phyl3  3.0.0
TreeLikelihoodData.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: The Bio++ Development Group
2 //
3 // SPDX-License-Identifier: CECILL-2.1
4 
5 #ifndef BPP_PHYL_LEGACY_LIKELIHOOD_TREELIKELIHOODDATA_H
6 #define BPP_PHYL_LEGACY_LIKELIHOOD_TREELIKELIHOODDATA_H
7 
8 
9 #include "../../Tree/Node.h"
10 #include "../../Tree/TreeTemplate.h"
11 
12 // From SeqLib:
15 
16 namespace bpp
17 {
26  public virtual Clonable
27 {
28 public:
31 
33 
34 public:
40  virtual const Node* getNode() const = 0;
41 
49  virtual void setNode(const Node* node) = 0;
50 };
51 
62  public virtual Clonable
63 {
64 public:
66  virtual ~TreeLikelihoodData() {}
67 
68  TreeLikelihoodData* clone() const = 0;
69 
70 public:
71  virtual std::shared_ptr<const Alphabet> getAlphabet() const = 0;
72  virtual std::shared_ptr< const TreeTemplate<Node>> getTree() const = 0;
73  virtual size_t getArrayPosition(int parentId, int sonId, size_t currentPosition) const = 0;
74  virtual size_t getRootArrayPosition(size_t site) const = 0;
75  virtual TreeLikelihoodNodeData& getNodeData(int nodeId) = 0;
76  virtual const TreeLikelihoodNodeData& getNodeData(int nodeId) const = 0;
77 
81  virtual size_t getNumberOfDistinctSites() const = 0;
82 
86  virtual size_t getNumberOfSites() const = 0;
87 
91  virtual size_t getNumberOfStates() const = 0;
92 
96  virtual unsigned int getWeight(size_t pos) const = 0;
97 
101  virtual const std::vector<unsigned int>& getWeights() const = 0;
102 };
103 } // end of namespace bpp.
104 #endif // BPP_PHYL_LEGACY_LIKELIHOOD_TREELIKELIHOODDATA_H
The phylogenetic node class.
Definition: Node.h:59
TreeLikelihood data structure.
virtual const std::vector< unsigned int > & getWeights() const =0
virtual TreeLikelihoodNodeData & getNodeData(int nodeId)=0
virtual size_t getArrayPosition(int parentId, int sonId, size_t currentPosition) const =0
virtual size_t getNumberOfStates() const =0
virtual size_t getNumberOfDistinctSites() const =0
virtual size_t getNumberOfSites() const =0
virtual std::shared_ptr< const Alphabet > getAlphabet() const =0
virtual std::shared_ptr< const TreeTemplate< Node > > getTree() const =0
virtual unsigned int getWeight(size_t pos) const =0
TreeLikelihoodData * clone() const =0
virtual size_t getRootArrayPosition(size_t site) const =0
virtual const TreeLikelihoodNodeData & getNodeData(int nodeId) const =0
TreeLikelihood partial data structure.
virtual void setNode(const Node *node)=0
Set the node associated to this data.
virtual const Node * getNode() const =0
Get the node associated to this data structure.
TreeLikelihoodNodeData * clone() const =0
Defines the basic types of data flow nodes.