From 0831b2734c79d29ad88396a252bd4772d8268642 Mon Sep 17 00:00:00 2001 From: Andreas Noack Date: Mon, 19 Feb 2024 22:01:11 +0100 Subject: [PATCH 1/2] Remove TruncatedNormal It's been deprecated for five years. --- src/truncated/normal.jl | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/truncated/normal.jl b/src/truncated/normal.jl index a3ff33e1e..6fb334273 100644 --- a/src/truncated/normal.jl +++ b/src/truncated/normal.jl @@ -1,15 +1,3 @@ -# Truncated normal distribution -""" - TruncatedNormal(mu, sigma, l, u) - -The *truncated normal distribution* is a particularly important one in the family of truncated distributions. -We provide additional support for this type with `TruncatedNormal` which calls `Truncated(Normal(mu, sigma), l, u)`. -Unlike the general case, truncated normal distributions support `mean`, `mode`, `modes`, `var`, `std`, and `entropy`. -""" -TruncatedNormal - -@deprecate TruncatedNormal(mu::Real, sigma::Real, a::Real, b::Real) truncated(Normal(mu, sigma), a, b) - ### statistics function mode(d::Truncated{<:Normal{<:Real},Continuous,T}) where {T<:Real} From 42b7d12e27c2f6250ac68b093387dbef46cb5e63 Mon Sep 17 00:00:00 2001 From: Andreas Noack Date: Mon, 19 Feb 2024 22:03:42 +0100 Subject: [PATCH 2/2] Merge TruncatedNormal docstring into Truncated docstring --- src/truncate.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/truncate.jl b/src/truncate.jl index a7b036fc8..45709f6b5 100644 --- a/src/truncate.jl +++ b/src/truncate.jl @@ -82,6 +82,9 @@ end Truncated Generic wrapper for a truncated distribution. + +The *truncated normal distribution* is a particularly important one in the family of truncated distributions. +Unlike the general case, truncated normal distributions support `mean`, `mode`, `modes`, `var`, `std`, and `entropy`. """ struct Truncated{D<:UnivariateDistribution, S<:ValueSupport, T<: Real, TL<:Union{T,Nothing}, TU<:Union{T,Nothing}} <: UnivariateDistribution{S} untruncated::D # the original distribution (untruncated)