@@ -29,11 +29,11 @@ export InvariantEnsemble
29
29
30
30
31
31
32
- # # Construct orthogonal polynomials as IFuns from first moment and recurrence relationship
32
+ # # Construct orthogonal polynomials as Funs from first moment and recurrence relationship
33
33
function orthonormalpolynomials (μ0,α:: Vector ,β:: Vector ,d)
34
34
n= length (α)+ 1
35
35
36
- p= Array (IFun{ Float64},n)
36
+ p= Array (Fun{ChebyshevSpace, Float64},n)
37
37
p[1 ] = Fun ([μ0],d)
38
38
p[2 ] = multiplybyx (p[1 ])./ β[1 ] - p[1 ]. * α[1 ]. / β[1 ]
39
39
for k = 3 : n
@@ -87,7 +87,7 @@ Base.size(ie::InvariantEnsemble,n)=size(ie.basis,2)
87
87
88
88
# Takes in list of OPs, constructs phis
89
89
# can be unstable for large n
90
- function InvariantEnsemble (p:: Array{IFun } ,V:: Function ,d,n:: Integer )
90
+ function InvariantEnsemble {F<:Fun} (p:: Array{F } ,V:: Function ,d,n:: Integer )
91
91
error (" Reimplement with matrix" )
92
92
93
93
# wsq=IFun(x->exp(-n/2.*V(x)),d)
@@ -200,7 +200,7 @@ function iekernel(q::Array{Float64,2},d,plan::Function)
200
200
end
201
201
end
202
202
203
- IFun (chebyshevtransform (ret,plan),d)
203
+ Fun (chebyshevtransform (ret,plan),d)
204
204
end
205
205
206
206
@@ -257,7 +257,7 @@ function samplespectra(q::Array{Float64,2},d,plan::Function,pts)
257
257
end
258
258
259
259
260
- function iekernel {D } (p:: Array{IFun{Float64,D} } )
260
+ function iekernel {F<:Fun } (p:: Array{F } )
261
261
ret = 0. * p[1 ]
262
262
for i = 1 : length (p)
263
263
ret += fasttimes (p[i],p[i])
@@ -266,7 +266,7 @@ function iekernel{D}(p::Array{IFun{Float64,D}})
266
266
ret
267
267
end
268
268
269
- function samplespectra {D } (p:: Array{IFun{Float64,D} } )
269
+ function samplespectra {F<:Fun } (p:: Array{F } )
270
270
n = length (p)
271
271
r= sample (iekernel (p)/ n)
272
272
if n== 1
0 commit comments