140
140
141
141
# Reads in recurrence relationship and constructs OPs
142
142
function InvariantEnsemble (str:: AbstractString ,V:: Function ,d,n:: Integer )
143
- file = Pkg . dir ( " RandomMatrices /data/CoefficientDatabase/" * str * " /" * string (n))
143
+ file = joinpath ( dirname ( @__FILE__ ), " .. /data/CoefficientDatabase/" * str * " /" * string (n))
144
144
μ0= readdlm (file * " norm.csv" )[1 ]
145
145
A= readdlm (file * " rc.csv" ,' ,' )
146
146
a= reshape ((A[1 ,1 : end - 1 ]),size (A)[2 ]- 1 )
152
152
153
153
# For constructing InvariantEnsembles that do not scale with n
154
154
function InvariantEnsembleUnscaled (str:: AbstractString ,V:: Function ,d,n:: Integer )
155
- file = Pkg . dir ( " RandomMatrices /data/CoefficientDatabaseUnscaled/" * str * " /" )
155
+ file = joinpath ( dirname ( @__FILE__ ), " .. /data/CoefficientDatabaseUnscaled/" * str * " /" )
156
156
μ0= readdlm (file * " norm.csv" )[1 ]
157
157
A= readdlm (file * " rc.csv" ,' ,' )
158
158
a= reshape ((A[1 ,1 : end - 1 ]),size (A)[2 ]- 1 )
@@ -289,7 +289,7 @@ samplespectra(p::InvariantEnsemble)=samplespectra(p.basis,p.domain)
289
289
290
290
291
291
function spectradatabase (str,n:: Integer ,m:: Colon )
292
- file = Pkg . dir ( " RandomMatrices /data/SpectraDatabase/" * str * " /" * string (n) * " .csv" );
292
+ file = joinpath ( dirname ( @__FILE__ ), " .. /data/SpectraDatabase/" * str * " /" * string (n) * " .csv" );
293
293
294
294
if (filesize (file) == 0 )
295
295
[]
@@ -299,21 +299,21 @@ function spectradatabase(str,n::Integer,m::Colon)
299
299
end
300
300
301
301
function spectradatabase (str,n:: Integer ,m:: Integer )
302
- if filesize (Pkg . dir ( " RandomMatrices /data/CoefficientDatabase" )) == 0 ||
303
- filesize (Pkg . dir ( " RandomMatrices /data/CoefficientDatabaseUnscaled" )) == 0
302
+ if filesize (joinpath ( dirname ( @__FILE__ ), " .. /data/CoefficientDatabase" )) == 0 ||
303
+ filesize (joinpath ( dirname ( @__FILE__ ), " .. /data/CoefficientDatabaseUnscaled" )) == 0
304
304
error (" No coefficient database found. InvariantEnsembles package corrupted." )
305
305
end
306
306
307
307
308
- dir = Pkg . dir ( " RandomMatrices /data/SpectraDatabase" )
308
+ dir = joinpath ( dirname ( @__FILE__ ), " .. /data/SpectraDatabase" )
309
309
if filesize (dir) == 0
310
310
warn (" Creating SpectraDatabase folder " * dir)
311
311
312
312
mkdir (dir)
313
313
end
314
314
315
315
316
- dir = Pkg . dir ( " RandomMatrices /data/SpectraDatabase/" * str)
316
+ dir = joinpath ( dirname ( @__FILE__ ), " .. /data/SpectraDatabase/" * str)
317
317
318
318
if filesize (dir) == 0
319
319
warn (" Creating folder " * dir)
0 commit comments