Internal API

UnivariateUnimodalHighestDensityRegion.region_handlingFunction
region_handling(d::UnivariateDistribution, region::Real)

Handles values of region that are not between 0 and 1.

If region is equal to 0.0, the mode of the distribution will be returned, if defined, else the median will be returned. These are returned as a vector of length 2.

If region is equal to 1.0, the minimum and maximum of the distribution will be returned.

If region is less than 0.0 or greater than 1.0, a DomainError will be thrown.

source
UnivariateUnimodalHighestDensityRegion._univariate_unimodal_HDRFunction
_univariate_unimodal_HDR(d::DiscreteUnivariateDistribution, 
    region::Real, 
    solve_alg, 
    solve_kwargs::NamedTuple)

Optimization-based approach on discrete distributions.

source
_univariate_unimodal_HDR(d::ContinuousUnivariateDistribution, 
    region::Real, 
    solve_alg, 
    solve_kwargs::NamedTuple)

Optimization-based approach on continuous distributions.

source