JuliaStats/Distributions.jl — pull request #290 by lindahua (2014-10-31 07:46:21+00:00)
Title: Improved implementation of `show` for distributions

I rewrote the codes for showing distributions. Hopefully, things look better now.

```julia
julia> using Distributions

julia> Normal(2.0, 1.5)
Normal(μ=2.0, σ=1.5)

julia> Beta(1.0, 2.3)
Beta(alpha=1.0, beta=2.3)

julia> Categorical([0.2, 0.5, 0.3])
Categorical(K=3, prob=[0.2,0.5,0.3])

julia> Multinomial(10, [0.2, 0.5, 0.3])
Multinomial(n=10, prob=[0.2,0.5,0.3])

julia> MvNormal(eye(3))
GenericMvNormal{PDMat}(
dim: 3
μ: [0.0,0.0,0.0]
Σ: 3x3 Array{Float64,2}:
1.0 0.0 0.0
0.0 1.0 0.0
0.0 0.0 1.0
)

julia> IsoNormal(3, 2.0)
GenericMvNormal{ScalMat}(
dim: 3
μ: [0.0,0.0,0.0]
Σ: 3x3 Array{Float64,2}:
4.0 0.0 0.0
0.0 4.0 0.0
0.0 0.0 4.0
)

julia> Dirichlet([2.0, 3.0, 4.0, 5.0])
Dirichlet(alpha=[2.0,3.0,4.0,5.0])
```