From 8091e613c9a39f77313e0d6115b0022b0553957a Mon Sep 17 00:00:00 2001 From: Orion Yeung <11580988+orionyeung001@users.noreply.github.com> Date: Fri, 24 May 2024 19:11:27 -0500 Subject: [PATCH] chore: run fmt before introducing fmt into CI --- src/distribution/internal.rs | 5 ++++- src/distribution/log_normal.rs | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/distribution/internal.rs b/src/distribution/internal.rs index f88c5f62..d9d75546 100644 --- a/src/distribution/internal.rs +++ b/src/distribution/internal.rs @@ -23,7 +23,10 @@ pub fn is_valid_multinomial(arr: &[f64], incl_zero: bool) -> bool { /// - function found not semi-monotone on the provided interval containing `z` /// Evaluates to `Some(k)`, where `k` satisfies the search criteria pub fn integral_bisection_search( - f: impl Fn(&K) -> T, z: T, lb: K, ub: K, + f: impl Fn(&K) -> T, + z: T, + lb: K, + ub: K, ) -> Option { if !(f(&lb)..=f(&ub)).contains(&z) { return None; diff --git a/src/distribution/log_normal.rs b/src/distribution/log_normal.rs index d991c020..b74986f9 100644 --- a/src/distribution/log_normal.rs +++ b/src/distribution/log_normal.rs @@ -113,6 +113,7 @@ impl ContinuousCDF for LogNormal { 0.5 * erf::erfc((x.ln() - self.location) / (self.scale * f64::consts::SQRT_2)) } } + /// Calculates the inverse cumulative distribution function for the /// log-normal distribution at `p` ///