|
A library for working with phylogenetic and population genetic data.
v0.32.0
|
|
Go to the documentation of this file. 1 #ifndef GENESIS_PLACEMENT_SIMULATOR_DISTRIBUTIONS_H_
2 #define GENESIS_PLACEMENT_SIMULATOR_DISTRIBUTIONS_H_
82 throw std::runtime_error(
83 "Incorrect number of edge weights for SimulatorEdgeDistribution."
109 std::discrete_distribution<size_t> distrib_;
175 std::discrete_distribution<size_t> placement_number_distrib_;
176 std::discrete_distribution<size_t> placement_path_length_distrib_;
178 std::vector<EdgeProximity> edge_proximities_;
230 std::piecewise_linear_distribution<double> distrib_;
264 distrib_ = std::uniform_real_distribution<double>(
min,
max);
289 std::uniform_real_distribution<double> distrib_;
323 distrib_ = std::uniform_real_distribution<double>( 0.0, 1.0 );
343 std::uniform_real_distribution<double> distrib_;
349 #endif // include guard
PlacementTree & tree()
Get the PlacementTree of this Sample.
double generate()
Return a randomly chosen like weight ratio.
std::vector< double > edge_weights
SimulatorPendantLengthDistribution & operator=(SimulatorPendantLengthDistribution const &)=default
SimulatorPendantLengthDistribution()=default
size_t generate()
Return a randomly chosen edge index, according to the distribution.
Manage a set of Pqueries along with the PlacementTree where the PqueryPlacements are placed on.
void prepare(Sample const &sample)
Prepare the distribution for usage. Needs to be called before generate().
SimulatorEdgeDistribution()=default
SimulatorLikeWeightRatioDistribution()=default
SimulatorLikeWeightRatioDistribution & operator=(SimulatorLikeWeightRatioDistribution const &)=default
void prepare(Sample const &sample)
Prepare the distribution for usage. Needs to be called before generate().
void prepare(Sample const &sample)
Prepare the distribution for usage. Needs to be called before generate().
Data class for PlacementTreeEdges. Stores the branch length of the edge, and the edge_num,...
SimulatorEdgeDistribution & operator=(SimulatorEdgeDistribution const &)=default
~SimulatorProximalLengthDistribution()=default
SimulatorProximalLengthDistribution & operator=(SimulatorProximalLengthDistribution const &)=default
std::vector< double > intervals
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
std::vector< double > weights
void prepare(Sample const &sample)
Prepare the distribution for usage. Needs to be called before generate().
~SimulatorLikeWeightRatioDistribution()=default
~SimulatorEdgeDistribution()=default
double generate(PlacementTreeEdge const &edge)
Return a randomly chosen position on an edge.
~SimulatorPendantLengthDistribution()=default
static Options & get()
Returns a single instance of this class.
double generate(PlacementTreeEdge const &edge)
Return a randomly chosen position on an edge.
SimulatorProximalLengthDistribution()=default
size_t edge_count() const
Return the number of TreeEdges of the Tree.