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_;
138 size_t total_candidates = 0;
161 std::string dump_edge_proximities()
const;
162 std::vector<size_t> edge_proximity_maxima()
const;
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 SimulatorEdgeDistribution()=default
Data class for PlacementTreeEdges. Stores the branch length of the edge, and the edge_num, as defined in the jplace standard.
PlacementTree & tree()
Get the PlacementTree of this Sample.
void prepare(Sample const &sample)
Prepare the distribution for usage. Needs to be called before generate().
size_t edge_count() const
Return the number of TreeEdges of the Tree.
Container namespace for all symbols of genesis in order to keep them separate when used as a library...
size_t generate()
Return a randomly chosen edge index, according to the distribution.
double generate(PlacementTreeEdge const &edge)
Return a randomly chosen position on an edge.
std::vector< double > weights
~SimulatorEdgeDistribution()=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().
std::vector< double > edge_weights
std::vector< double > intervals
Manage a set of Pqueries along with the PlacementTree where the PqueryPlacements are placed on...
SimulatorEdgeDistribution & operator=(SimulatorEdgeDistribution const &)=default
double generate()
Return a randomly chosen like weight ratio.
double generate(PlacementTreeEdge const &edge)
Return a randomly chosen position on an edge.
static Options & get()
Returns a single instance of this class.