39 /** Generates a set of N independent samples via rejection sampling.
40 * \param desiredSamples The number of desired samples to generate
41 * \param outSamples The output samples.
42 * \param timeoutTrials The maximum number of rejection trials for each generated sample (i.e. the maximum number of iterations). This can be used to set a limit to the time complexity of the algorithm for difficult probability densities.
43 * All will have equal importance weights (a property of rejection sampling), although those samples
44 * generated at timeout will have a different importance weights.