Quetzal-CoaTL
The Coalescence Template Library
Loading...
Searching...
No Matches
quetzal::coalescence::occupancy_spectrum::sampling_policy::in_memoized_distribution< FilterPolicy, EditorPolicy > Struct Template Reference

#include <quetzal/coalescence/occupancy_spectrum/sampling_policy.hpp>

Detailed Description

template<class FilterPolicy = filter_policy::return_always_true, class EditorPolicy = editor_policy::identity>
struct quetzal::coalescence::occupancy_spectrum::sampling_policy::in_memoized_distribution< FilterPolicy, EditorPolicy >

Sample occupancy spectrums from a pre-computed ProbabilityDistribution object.

Template Parameters
FilterPolicyA filter_policy class, by default filter_policy::return_always_true
EditorPolicyA editor_policy class, by default editor_policy::identity

Static Public Member Functions

template<typename Generator >
static auto const & sample (int k, int N, Generator &g)
 Sample an occupancy spectrum.
 

Member Function Documentation

◆ sample()

template<class FilterPolicy = filter_policy::return_always_true, class EditorPolicy = editor_policy::identity>
template<typename Generator >
static auto const & quetzal::coalescence::occupancy_spectrum::sampling_policy::in_memoized_distribution< FilterPolicy, EditorPolicy >::sample ( int  k,
int  N,
Generator &  g 
)
inlinestatic

Sample an occupancy spectrum.

Template Parameters
GeneratorA random number generator type
Parameters
kthe number of balls (lineages) to throw (coalesce)
Nthe nummber of urns (parents)
grandom number generator
Returns
a random OccupancySpectrum object

The documentation for this struct was generated from the following file: