We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84d89a7 commit ec99801Copy full SHA for ec99801
rand_distr/src/poisson.rs
@@ -67,6 +67,7 @@ where Standard: Distribution<N>
67
impl<N: Float> Distribution<N> for Poisson<N>
68
where Standard: Distribution<N>
69
{
70
+ #[inline]
71
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> N {
72
// using the algorithm from Numerical Recipes in C
73
@@ -124,6 +125,7 @@ where Standard: Distribution<N>
124
125
impl<N: Float> Distribution<u64> for Poisson<N>
126
127
128
129
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> u64 {
130
let result: N = self.sample(rng);
131
result.to_u64().unwrap()
0 commit comments