Internal API
UnivariateUnimodalHighestDensityRegion._univariate_unimodal_HDR
UnivariateUnimodalHighestDensityRegion.region_handling
UnivariateUnimodalHighestDensityRegion.region_handling
— Functionregion_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.
UnivariateUnimodalHighestDensityRegion._univariate_unimodal_HDR
— Function_univariate_unimodal_HDR(d::DiscreteUnivariateDistribution,
region::Real,
solve_alg,
solve_kwargs::NamedTuple)
Optimization-based approach on discrete distributions.
_univariate_unimodal_HDR(d::ContinuousUnivariateDistribution,
region::Real,
solve_alg,
solve_kwargs::NamedTuple)
Optimization-based approach on continuous distributions.