From 12b01197f8aa6fdd46f760077fefd278811f7331 Mon Sep 17 00:00:00 2001 From: Orion Yeung <11580988+orionyeung001@users.noreply.github.com> Date: Mon, 2 Dec 2024 13:32:08 -0600 Subject: [PATCH] chore: lint: can elide lifetime for rustc 1.65 --- src/distribution/dirichlet.rs | 2 +- src/distribution/multinomial.rs | 2 +- src/distribution/multivariate_normal.rs | 2 +- src/distribution/multivariate_students_t.rs | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/distribution/dirichlet.rs b/src/distribution/dirichlet.rs index 2974db88..aabcc9cb 100644 --- a/src/distribution/dirichlet.rs +++ b/src/distribution/dirichlet.rs @@ -267,7 +267,7 @@ where } } -impl<'a, D> Continuous<&'a OVector, f64> for Dirichlet +impl Continuous<&OVector, f64> for Dirichlet where D: Dim, nalgebra::DefaultAllocator: nalgebra::allocator::Allocator diff --git a/src/distribution/multinomial.rs b/src/distribution/multinomial.rs index db4ebdac..f5b88945 100644 --- a/src/distribution/multinomial.rs +++ b/src/distribution/multinomial.rs @@ -280,7 +280,7 @@ where // } // } -impl<'a, D> Discrete<&'a OVector, f64> for Multinomial +impl Discrete<&OVector, f64> for Multinomial where D: Dim, nalgebra::DefaultAllocator: nalgebra::allocator::Allocator, diff --git a/src/distribution/multivariate_normal.rs b/src/distribution/multivariate_normal.rs index bfdd173a..f1b7be70 100644 --- a/src/distribution/multivariate_normal.rs +++ b/src/distribution/multivariate_normal.rs @@ -337,7 +337,7 @@ where } } -impl<'a, D> Continuous<&'a OVector, f64> for MultivariateNormal +impl Continuous<&OVector, f64> for MultivariateNormal where D: Dim, nalgebra::DefaultAllocator: diff --git a/src/distribution/multivariate_students_t.rs b/src/distribution/multivariate_students_t.rs index f46843ec..a1b78551 100644 --- a/src/distribution/multivariate_students_t.rs +++ b/src/distribution/multivariate_students_t.rs @@ -325,7 +325,7 @@ where } } -impl<'a, D> Continuous<&'a OVector, f64> for MultivariateStudent +impl Continuous<&OVector, f64> for MultivariateStudent where D: Dim + DimMin, nalgebra::DefaultAllocator: nalgebra::allocator::Allocator @@ -348,7 +348,7 @@ where /// - `inv(Σ)` is the precision matrix, /// - `det(Σ)` is the determinant of the scale matrix, and /// - `k` is the dimension of the distribution. - fn pdf(&self, x: &'a OVector) -> f64 { + fn pdf(&self, x: &OVector) -> f64 { if self.freedom.is_infinite() { use super::multivariate_normal::density_normalization_and_exponential; let (pdf_const, exp_arg) = density_normalization_and_exponential( @@ -369,7 +369,7 @@ where /// Calculates the log probability density function for the multivariate /// student distribution at `x`. Equivalent to pdf(x).ln(). - fn ln_pdf(&self, x: &'a OVector) -> f64 { + fn ln_pdf(&self, x: &OVector) -> f64 { if self.freedom.is_infinite() { use super::multivariate_normal::density_normalization_and_exponential; let (pdf_const, exp_arg) = density_normalization_and_exponential(