This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pkg.build("FastTransforms") | |
using FastTransforms | |
N = 2.^(7:12) | |
tSP = zeros(length(N), 3) | |
Nr = 3 | |
j = 1 | |
for n in N | |
A = sphrandn(Float64, n+1, n+1) | |
SlowSphericalHarmonicPlan(A) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using FastTransforms, PyPlot | |
N = 40 | |
t = Matrix{Float64}(N,6) | |
err = Matrix{Float64}(N,3) | |
for i in 1:N | |
n = round(Int64, 10.0^(1 + 5*((i-1)/(N-1)))) | |
v = rand(n) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using FastTransforms, PyPlot | |
errASY1,errASY2,errCXN1,errCXN2 = Float64[],Float64[],Float64[],Float64[] | |
n = round(Int,logspace(1,5,30)) | |
for k in n | |
println("This is k: ",k) | |
srand(0) | |
c = randn(k) | |
push!(errASY1,norm(icjt(cjt(c,0.,0.),0.,0.)-c,Inf)) | |
push!(errASY2,norm(cjt(icjt(c,0.,0.),0.,0.)-c,Inf)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using ApproxFun | |
import ApproxFun: Fun, domain, Space, checkpoints, ArraySpace, zerocfsFun, defaultFun, real | |
function myFun(f, d::Space) | |
#TODO: reuse function values? | |
T = eltype(domain(d)) | |
if T <: Complex | |
T = T.parameters[1] #get underlying real representation | |
end | |
r=checkpoints(d) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# woodburysolve | |
# | |
using ApproxFun, SingularIntegralEquations, PyPlot | |
d = 8 | |
t1,t2 = Array(Float64,min(d,6)),Array(Float64,d) | |
for i = 1:d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using PyCall | |
pygui(:tk) | |
using PyPlot | |
using ApproxFun | |
gc() | |
gc_disable() | |
N = 36 |