bpp-phyl3  3.0.0
CollectionNodes.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_LIKELIHOOD_DATAFLOW_COLLECTIONNODES_H
6 #define BPP_PHYL_LIKELIHOOD_DATAFLOW_COLLECTIONNODES_H
7 
9 
15 
16 namespace bpp
17 {
25 {
26 private:
27  std::shared_ptr<const SubstitutionProcessCollection> collection_;
28 
30 
35 
40 
45 
50 
51 public:
54  std::shared_ptr<const SubstitutionProcessCollection> collection);
55 
57  {
58  throw Exception("CollectionNodes::clone should not be called.");
59  }
60 
62  {
63  return context_;
64  }
65 
67  {
68  return *collection_;
69  }
70 
71  std::shared_ptr<const SubstitutionProcessCollection> getCollection() const
72  {
73  return collection_;
74  }
75 
76  ConfiguredModel& model(size_t modelIndex)
77  {
78  return dynamic_cast<ConfiguredModel&>(*modelColl_[modelIndex]);
79  }
80 
81  std::shared_ptr<ConfiguredModel> getModel(size_t modelIndex)
82  {
83  return std::dynamic_pointer_cast<ConfiguredModel>(modelColl_[modelIndex]);
84  }
85 
87  {
88  return modelColl_;
89  }
90 
91  std::shared_ptr<ConfiguredFrequencySet> getFrequencies(size_t freqIndex)
92  {
93  return std::dynamic_pointer_cast<ConfiguredFrequencySet>(freqColl_[freqIndex]);
94  }
95 
96  std::shared_ptr<ConfiguredDistribution> getRateDistribution(size_t distIndex)
97  {
98  return std::dynamic_pointer_cast<ConfiguredDistribution>(distColl_[distIndex]);
99  }
100 
101  std::shared_ptr<ProcessTree> getProcessTree(size_t treeIndex);
102 };
103 } // namespace bpp
104 #endif // BPP_PHYL_LIKELIHOOD_DATAFLOW_COLLECTIONNODES_H
ParametrizableCollection< ProcessTree > treeColl_
A collection of trees.
ConfiguredModel & model(size_t modelIndex)
CollectionNodes * clone() const
ParametrizableCollection< ConfiguredModel > & getModelCollection()
ParametrizableCollection< ConfiguredFrequencySet > freqColl_
A collection of Frequencies Sets.
std::shared_ptr< ConfiguredFrequencySet > getFrequencies(size_t freqIndex)
std::shared_ptr< const SubstitutionProcessCollection > collection_
std::shared_ptr< ConfiguredDistribution > getRateDistribution(size_t distIndex)
const SubstitutionProcessCollection & collection() const
CollectionNodes(Context &context, std::shared_ptr< const SubstitutionProcessCollection > collection)
ParametrizableCollection< ConfiguredDistribution > distColl_
A collection of DiscreteDistributions.
std::shared_ptr< ProcessTree > getProcessTree(size_t treeIndex)
std::shared_ptr< ConfiguredModel > getModel(size_t modelIndex)
std::shared_ptr< const SubstitutionProcessCollection > getCollection() const
ParametrizableCollection< ConfiguredModel > modelColl_
A collection of Branch Models.
Likelihood transition model.
Definition: Model.h:48
Context for dataflow node construction.
Definition: DataFlow.h:527
Collection of Substitution Process, which owns all the necessary objects: Substitution models,...
Defines the basic types of data flow nodes.