template<class FilterPolicy = filter_policy::return_always_true, class EditorPolicy = editor_policy::identity>
class quetzal::coalescence::occupancy_spectrum::ProbabilityDistribution< FilterPolicy, EditorPolicy >
Occupancy spectrum distributed according to the probability function given by von Mises (1939).
- Template Parameters
-
FilterPolicy | Function object class acting as a unary predicate, taking the probability of the spectrum as argument and returning a boolean. The signature should be bool FilterPolicy::operator()(double) |
EditorPolicy | Policy class to edit the occupancy spectrum for optimal speed and memory usage. The class should expose a member with signature OccupancySpectrum EditorPolicy::edit(OccupancySpectrum &&) . |
|
| ProbabilityDistribution ()=default |
| Default constructor.
|
|
| ProbabilityDistribution (int n, int m, FilterPolicy pred=FilterPolicy()) |
| Construct the occupancy spectrum distribution resulting from throwing \(n\) balls into \(m\) urns.
|
|
| ProbabilityDistribution (const self_type &)=delete |
| Copy constructor.
|
|
| ProbabilityDistribution (self_type &&)=default |
| Move constructor.
|
|
self_type & | operator= (self_type &&)=default |
| Move assignment operator.
|
|
self_type & | operator= (const self_type &)=delete |
| Deleted copy assignment operator.
|
|
template<typename Generator > |
const spectrum_type & | operator() (Generator &g) const |
| Generates random occupancy spectrum that are distributed according to the associated probability function given by von Mises (1939).
|
|
int | n () const |
| The number of balls (coalescing lineages) that are thrown in the random experience.
|
|
int | m () const |
| The number of urns (parents) used in the random experience.
|
|
const support_type & | support () const |
| Get a constant reference on the support of occupancy spectrum distribution.
|
|
const probabilities_type & | weights () const |
| Get a constant reference the weights associated to each spectrum.
|
|