diff --git a/src/basic.jl b/src/basic.jl index e972950..fdacd3c 100644 --- a/src/basic.jl +++ b/src/basic.jl @@ -73,21 +73,3 @@ function clamp end bounds(i::AbstractInterval) = (infimum(i), supremum(i)) Base.clamp(x, i::AbstractInterval) = IntevalSets.clamp(x, i) - - -# Treat distributions as spaces -function SpaceStyle(d::T) where {T <: Distribution} - return Distributions.value_support(d) == Discrete ? FiniteSpaceStyle : ContinuousSpaceStyle -end - -Base.in(x, d::Distribution) = insupport(d, x) - -function Base.clamp(x, d::Distribution) - @assert SpaceStyle(d) == Continuous "clamp requires a ContinuousSpaceStyle" - return clamp.(x, extrema(d)...) -end - -function bounds(d::Distribution) - @assert SpaceStyle(d) == Continuous "Bounds requires a ContinuousSpaceStyle" - return extrema(d) -end