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) 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}