From 9aa4effb317bb52982300e8a4311d51f72ca7bd0 Mon Sep 17 00:00:00 2001 From: geekyjackson <105396509+the-one-and-only-jackson@users.noreply.github.com> Date: Thu, 1 Jun 2023 17:59:08 -0600 Subject: [PATCH] Revert "Adding Distributions.jl as spaces" This reverts commit 9056ddcb76d40a476498becee3c15aa7f1931af0. --- src/basic.jl | 18 ------------------ 1 file changed, 18 deletions(-) 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