Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
259: implement Base.show for core types r=haakon-e a=haakon-e See #257 for details. With this implementation, combining all the examples [here](https://clima.github.io/EnsembleKalmanProcesses.jl/dev/parameter_distributions/#ParameterDistribution-constructor) gives a vector that displays like this: ```julia julia> combine_distributions([u; prior]) ParameterDistribution with 7 entries: 'constrained_mvnormal' with Constraint[Bounds: (0, ∞), Bounds: (0, ∞), Bounds: (0, ∞)] over distribution Parameterized(FullNormal( dim: 3 μ: [1.0, 1.0, 1.0] Σ: [0.5 0.25 0.0; 0.25 0.5 0.25; 0.0 0.25 0.5] ) ) 'constrained_sampled' with Constraint[Bounds: (10, 15), Bounds: (-∞, ∞)] over distribution Samples{Float64}([1.0 5.0 9.0 13.0; 3.0 7.0 11.0 15.0]) 'Beta' with Constraint[Bounds: (-∞, ∞), Bounds: (-∞, ∞), Bounds: (-∞, ∞), Bounds: (-∞, ∞), Bounds: (-∞, ∞), Bounds: (-∞, ∞), Bounds: (-∞, ∞), Bounds: (-∞, ∞), Bounds: (-∞, ∞), Bounds: (-∞, ∞), Bounds: (-∞, ∞), Bounds: (-∞, ∞), Bounds: (-∞, ∞), Bounds: (-∞, ∞), Bounds: (-∞, ∞), Bounds: (-∞, ∞), Bounds: (-∞, ∞), Bounds: (-∞, ∞), Bounds: (-∞, ∞), Bounds: (-∞, ∞)] over distribution VectorOfParameterized{Beta{Float64}}(Beta{Float64}[Beta{Float64}(α=2.0, β=2.0), Beta{Float64}(α=2.0, β=2.0), Beta{Float64}(α=2.0, β=2.0), Beta{Float64}(α=2.0, β=2.0), Beta{Float64}(α=2.0, β=2.0), Beta{Float64}(α=2.0, β=2.0), Beta{Float64}(α=2.0, β=2.0), Beta{Float64}(α=2.0, β=2.0), Beta{Float64}(α=2.0, β=2.0), Beta{Float64}(α=2.0, β=2.0), Beta{Float64}(α=2.0, β=2.0), Beta{Float64}(α=2.0, β=2.0), Beta{Float64}(α=2.0, β=2.0), Beta{Float64}(α=2.0, β=2.0), Beta{Float64}(α=2.0, β=2.0), Beta{Float64}(α=2.0, β=2.0), Beta{Float64}(α=2.0, β=2.0), Beta{Float64}(α=2.0, β=2.0), Beta{Float64}(α=2.0, β=2.0), Beta{Float64}(α=2.0, β=2.0)]) 'point_seven' with Constraint[Bounds: (0.0, 1.0)] over distribution Parameterized(Normal{Float64}(μ=0.9581731745582243, σ=0.7851841275859747)) 'upper bound' with Constraint[Bounds: (-∞, 5.0)] over distribution Parameterized(Normal{Float64}(μ=1.458006955602075, σ=0.03487311564634986)) 'lower bound' with Constraint[Bounds: (-5.0, ∞)] over distribution Parameterized(Normal{Float64}(μ=1.740120034293624, σ=0.026311235124201148)) 'no bound' with Constraint[Bounds: (-∞, ∞)] over distribution Parameterized(Normal{Float64}(μ=0.7, σ=0.15)) ``` Individual constraints render like this: ```julia julia> no_constraint() Constraint{NoConstraint} with bounds (-∞, ∞) julia> bounded_below(-5) Constraint{BoundedBelow} with bounds (-5, ∞) julia> bounded_above(-5) Constraint{BoundedAbove} with bounds (-∞, -5) julia> bounded(-5,5) Constraint{Bounded} with bounds (-5, 5) ``` Co-authored-by: Haakon Ludvig Langeland Ervik <[email protected]>
- Loading branch information