Skip to content

Commit 2ebe922

Browse files
committed
Make Haar symbolic tests dependent on GSL presence
1 parent b16df29 commit 2ebe922

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/HaarSymbolic.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ end
6464
data(P::Ptr{gsl_permutation}) = [convert(Int64, x)+1 for x in
6565
pointer_to_array(permutation_data(P), (convert(Int64, permutation_size(P)) ,))]
6666

67-
end #_HAVE_GSL
68-
6967
immutable UniformHaar <: ContinuousMatrixDistribution
7068
beta::Float64
7169
N::Int
@@ -275,8 +273,6 @@ end
275273

276274
expectedtrace(N::Integer, MyQ::Symbol, X::Expr)=expectation(N, MyQ, X, true)
277275

278-
if _HAVE_GSL
279-
280276
#Computes the Weingarten function for permutations
281277
function WeingartenUnitary(N::Integer, P::Ptr{gsl_permutation})
282278
C = cycle_structure(P)

test/Haar.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1+
if _HAVE_GSL
12
N=5
23
A=randn(N,N)
34
B=randn(N,N)
45
Q=UniformHaar(2, N)
56

67
#Test case where there are no symbolic Haar matrices
78
@test_approx_eq eval(expectation(N, :Q, :(A*B))) A*B
8-
99
#Test case where there is one pair of symbolic Haar matrices
1010
@test_approx_eq eval(expectedtrace(N, :Q, :(A*Q*B*Q'))) trace(A)*trace(B)/N
1111

1212
println("Case 3")
1313
println("E(A*Q*B*Q'*A*Q*B*Q') = ", eval(expectation(N, :Q, :(A*Q*B*Q'*A*Q*B*Q'))))
1414

15+
end #_HAVE_GSL

0 commit comments

Comments
 (0)