Skip to content

Commit 4c2171e

Browse files
committed
Make HaarSymbolic respect _HAVE_GSL
1 parent 535fa6e commit 4c2171e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/HaarSymbolic.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using GSL
21
using Catalan
32

43
export permutations_in_Sn, compose, cycle_structure, data, part, #Functions working with partitions and permutations
@@ -31,6 +30,7 @@ function permutations_in_Sn(n::Integer)
3130
end
3231
end
3332

33+
if _HAVE_GSL
3434
function compose(P::Ptr{gsl_permutation}, Q::Ptr{gsl_permutation})
3535
#Compose the permutations
3636
n=convert(Int64, permutation_size(P))
@@ -64,6 +64,8 @@ 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+
6769
immutable UniformHaar <: ContinuousMatrixDistribution
6870
beta::Float64
6971
N::Int
@@ -273,6 +275,8 @@ end
273275

274276
expectedtrace(N::Integer, MyQ::Symbol, X::Expr)=expectation(N, MyQ, X, true)
275277

278+
if _HAVE_GSL
279+
276280
#Computes the Weingarten function for permutations
277281
function WeingartenUnitary(N::Integer, P::Ptr{gsl_permutation})
278282
C = cycle_structure(P)
@@ -298,3 +302,4 @@ function WeingartenUnitary(N::Integer, P::Partition)
298302
float64(thesum)
299303
end
300304

305+
end #_HAVE_GSL

0 commit comments

Comments
 (0)