@@ -34,6 +34,8 @@ chi(df) = df==0? 0.0 : sqrt(rand(Chisq(df)))
34
34
# ############################
35
35
36
36
# Generates a NxN symmetric Wigner matrix
37
+ # For beta=1,2,4, generates a NxN matrix from the Gaussian orthogonal/unitary/
38
+ # symplectic ensembles
37
39
function GaussianHermiteMatrix (n:: Integer , beta:: Integer )
38
40
if beta == 1 # real
39
41
A = randn (n, n)
77
79
# Generates a NxN Hermitian Wishart matrix
78
80
# n: exterior dimension of matrix
79
81
# m: "interior" dimension of the matrix
82
+ # These are sometimes called white Wishart matrices, reflecting their properties
83
+ # as random covariance matrices with underlying covariance = identity.
80
84
function GaussianLaguerreMatrix (n:: Integer , m:: Integer , beta:: Integer )
81
85
if beta == 1 # real
82
86
A = randn (n, m)
@@ -127,7 +131,7 @@ function GaussianLaguerreDensity(n::Integer, m::Integer, beta::Real, x::Real)
127
131
end
128
132
function GaussianLaguerreDensity (c:: Real , beta:: Real , x:: Real )
129
133
# There is also a finite mass at 0 for c>1 of weight (1 - 1/c)
130
- if c> 1 && x== 0 return Inf
134
+ # if c>1 && x==0 return Inf end
131
135
am, ap = beta* (1 - sqrt (c))^ 2 , beta* (1 - sqrt (c))^ 2
132
136
sqrt ((x- am)* (ap- x))/ (2 * pi * beta* x* c)
133
137
end
@@ -242,7 +246,7 @@ function GaussianJacobiDensity(c1::Real, c2::Real, beta::Real, x::Real)
242
246
if ! (0 <= c1<= 1 ) error (string (" Need 0<=c1<=1 but you have c1=" , c1)) end
243
247
if ! (beta== 1 ) error (string (" beta!=1 not implemented" )) end
244
248
# Finite mass at 0 of weight (1-1/c2)
245
- if c2> 1 && x== 0 return Inf
249
+ # if c2>1 && x==0 return Inf end
246
250
b0= c1* x- c2* x- c1+ 2
247
251
b1= - 2 c2* x^ 2 + 2 x- 3 c1* x+ c1+ c2* x- 1 + 2 c1* x^ 2
248
252
b2= c1* x- 2 c1* x^ 2 + c2* x^ 2 - x^ 3 * c2+ x^ 3 * c1
0 commit comments