A toolkit for working with phylogenetic data.
v0.19.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
simulator.hpp
Go to the documentation of this file.
1 #ifndef GENESIS_PLACEMENT_SIMULATOR_SIMULATOR_H_
2 #define GENESIS_PLACEMENT_SIMULATOR_SIMULATOR_H_
3 
4 /*
5  Genesis - A toolkit for working with phylogenetic data.
6  Copyright (C) 2014-2017 Lucas Czech
7 
8  This program is free software: you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation, either version 3 of the License, or
11  (at your option) any later version.
12 
13  This program is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with this program. If not, see <http://www.gnu.org/licenses/>.
20 
21  Contact:
22  Lucas Czech <lucas.czech@h-its.org>
23  Exelixis Lab, Heidelberg Institute for Theoretical Studies
24  Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
25 */
26 
35 
37 
38 namespace genesis {
39 namespace placement {
40 
41 // =================================================================================================
42 // Placement Simulator
43 // =================================================================================================
44 
48 class Simulator
49 {
50 public:
51 
52  // -----------------------------------------------------
53  // Constructor
54  // -----------------------------------------------------
55 
56  Simulator() = default;
57  ~Simulator() = default;
58 
59  Simulator( Simulator const& ) = default;
60  Simulator( Simulator&& ) = default;
61 
62  Simulator& operator= ( Simulator const& ) = default;
63  Simulator& operator= ( Simulator&& ) = default;
64 
65  // -----------------------------------------------------
66  // Member Functions
67  // -----------------------------------------------------
68 
69  void generate( Sample& sample, size_t n );
70 
71  // -----------------------------------------------------
72  // Accessors
73  // -----------------------------------------------------
74 
76  {
77  return edge_distribution_;
78  }
79 
81  {
82  return extra_placement_distribution_;
83  }
84 
86  {
87  return like_weight_ratio_distribution_;
88  }
89 
91  {
92  return proximal_length_distribution_;
93  }
94 
96  {
97  return pendant_length_distribution_;
98  }
99 
100  // -----------------------------------------------------
101  // Data Members
102  // -----------------------------------------------------
103 
104 private:
105 
106  SimulatorEdgeDistribution edge_distribution_;
107  SimulatorExtraPlacementDistribution extra_placement_distribution_;
108  SimulatorLikeWeightRatioDistribution like_weight_ratio_distribution_;
109  SimulatorProximalLengthDistribution proximal_length_distribution_;
110  SimulatorPendantLengthDistribution pendant_length_distribution_;
111 
112 };
113 
114 } // namespace placement
115 } // namespace genesis
116 
117 #endif // include guard
SimulatorExtraPlacementDistribution & extra_placement_distribution()
Definition: simulator.hpp:80
void generate(Sample &sample, size_t n)
Generate n many Pqueries and place them in the Sample.
Definition: simulator.cpp:47
Simulate Pqueries on the Tree of a Sample.
Definition: simulator.hpp:48
SimulatorLikeWeightRatioDistribution & like_weight_ratio_distribution()
Definition: simulator.hpp:85
SimulatorPendantLengthDistribution & pendant_length_distribution()
Definition: simulator.hpp:95
Simulator & operator=(Simulator const &)=default
Generate a certain number of additional PqueryPlacements around a given PlacementTreeEdge.
Manage a set of Pqueries along with the PlacementTree where the PqueryPlacements are placed on...
Definition: sample.hpp:68
SimulatorEdgeDistribution & edge_distribution()
Definition: simulator.hpp:75
SimulatorProximalLengthDistribution & proximal_length_distribution()
Definition: simulator.hpp:90