Skip to content

Commit

Permalink
Merge 42b7d12 into 3d71a2b
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasnoack authored Feb 19, 2024
2 parents 3d71a2b + 42b7d12 commit f9c0098
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
3 changes: 3 additions & 0 deletions src/truncate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 0 additions & 12 deletions src/truncated/normal.jl
Original file line number Diff line number Diff line change
@@ -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}
Expand Down

0 comments on commit f9c0098

Please sign in to comment.