<divclass="platform-hinted "data-platform-hinted="data-platform-hinted"><divclass="content sourceset-dependent-content"data-active=""data-togglable=":kmath-stat:dokkaHtmlPartial/commonMain"><divclass="symbol monospace"><spanclass="token keyword"></span><spanclass="token keyword">fun </span><ahref="-poisson-sampler.html"><spanclass="token function">PoissonSampler</span></a><spanclass="token punctuation">(</span><spanclass="parameters "><spanclass="parameter ">mean<spanclass="token operator">: </span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html">Double</a></span></span><spanclass="token punctuation">)</span><spanclass="token operator">: </span><ahref="../space.kscience.kmath.stat/-sampler/index.html">Sampler</a><spanclass="token operator"><</span><spanclass="token keyword"></span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a><spanclass="token operator">></span><spanclass="clearfix"><spanclass="floating-right">(<ahref="https://github.com/SciProgCentre/kmath/tree/master/kmath-stat/src/commonMain/kotlin/space/kscience/kmath/samplers/PoissonSampler.kt#L31">source</a>)</span></span></div><pclass="paragraph">Sampler for the Poisson distribution.</p><ul><li><pclass="paragraph">For small means, a Poisson process is simulated using uniform deviates, as described in Knuth (1969). Seminumerical Algorithms. The Art of Computer Programming, Volume 2. Chapter 3.4.1.F.3 Important integer-valued distributions: The Poisson distribution. Addison Wesley. The Poisson process (and hence, the returned value) is bounded by 1000 * mean.</p></li><li><pclass="paragraph">For large means, we use the rejection algorithm described in Devroye, Luc. (1981). The Computer Generation of Poisson Random Variables Computing vol. 26 pp. 197-207.</p></li></ul><pclass="paragraph">Based on Commons RNG implementation. See https://commons.apache.org/proper/commons-rng/commons-rng-sampling/apidocs/org/apache/commons/rng/sampling/distribution/PoissonSampler.html.</p></div></div>