Skip to content

Commit

Permalink
feat: Add support for Gumbel distribution
Browse files Browse the repository at this point in the history
- Fix added: rand feature added to distribution
to fix CI error
  • Loading branch information
soumyasen1809 authored and YeungOnion committed Sep 16, 2024
1 parent f561f94 commit a395dd1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/distribution/gumbel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ impl std::fmt::Display for Gumbel {
}
}

#[cfg(feature = "rand")]
impl ::rand::distributions::Distribution<f64> for Gumbel {
fn sample<R: rand::Rng + ?Sized>(&self, r: &mut R) -> f64 {
self.location - self.scale * ((-(r.gen::<f64>())).ln()).ln()
Expand Down

0 comments on commit a395dd1

Please sign in to comment.