Skip to content

Commit b967e6f

Browse files
tests pass locally!
1 parent 2aa1a6d commit b967e6f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+931
-5622
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
docs/build/
22
docs/site/
3-
FastTransforms
3+
deps/FastTransforms

Project.toml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,21 @@
11
name = "FastTransforms"
22
uuid = "057dd010-8810-581a-b7be-e3fc3b93f78c"
3-
version = "0.5"
3+
version = "0.5.0"
44

55
[deps]
66
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"
7-
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
87
DSP = "717857b8-e6f2-59f4-9121-6e50c889abd2"
98
FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
10-
HierarchicalMatrices = "7c893195-952b-5c83-bb6e-be12f22eed51"
9+
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
1110
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
12-
LowRankApprox = "898213cb-b102-5a47-900c-97e73b919f73"
13-
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
1411
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
12+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1513
ToeplitzMatrices = "c751599d-da0a-543b-9d20-d0a503d91d24"
1614

1715
[compat]
1816
AbstractFFTs = "≥ 0.3.1"
19-
Compat = "≥ 0.17.0"
2017
DSP = "≥ 0.4.0"
2118
FFTW = "≥ 0.0.4"
22-
HierarchicalMatrices = "≥ 0.1.1"
23-
LowRankApprox = "≥ 0.1.1"
24-
ProgressMeter = "≥ 0.3.4"
2519
SpecialFunctions = "≥ 0.3.4"
2620
ToeplitzMatrices = "≥ 0.4.0"
27-
julia = "0.7, 1"
21+
julia = "≥ 1.0"

examples/chebyshev.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ using FastTransforms
77

88
# first kind points -> first kind polynomials
99
n = 20
10-
p_1 = [sinpi((n-2k-1)/2n) for k=0:n-1]
10+
p_1 = chebyshevpoints(Float64, n; kind=1)
1111
f = exp.(p_1)
1212
= chebyshevtransform(f; kind=1)
1313

@@ -18,7 +18,7 @@ f̃(0.1) ≈ exp(0.1)
1818
ichebyshevtransform(f̌; kind=1) exp.(p_1)
1919

2020
# second kind points -> first kind polynomials
21-
p_2 = [cospi(k/(n-1)) for k=0:n-1]
21+
p_2 = chebyshevpoints(Float64, n; kind=2)
2222
f = exp.(p_2)
2323
= chebyshevtransform(f; kind=2)
2424

@@ -31,7 +31,7 @@ ichebyshevtransform(f̌; kind=2) ≈ exp.(p_2)
3131

3232
# first kind points -> second kind polynomials
3333
n = 20
34-
p_1 = [sinpi((n-2k-1)/2n) for k=0:n-1]
34+
p_1 = chebyshevpoints(Float64, n; kind=1)
3535
f = exp.(p_1)
3636
= chebyshevutransform(f; kind=1)
3737
= x -> [sin((k+1)*acos(x))/sin(acos(x)) for k=0:n-1]' *
@@ -42,7 +42,7 @@ ichebyshevutransform(f̌; kind=1) ≈ exp.(p_1)
4242

4343

4444
# second kind points -> second kind polynomials
45-
p_2 = [cospi(k/(n-1)) for k=1:n-2]
45+
p_2 = chebyshevpoints(Float64, n; kind=2)[2:n-1]
4646
f = exp.(p_2)
4747
= chebyshevutransform(f; kind=2)
4848
= x -> [sin((k+1)*acos(x))/sin(acos(x)) for k=0:n-3]' *

examples/sphere.jl

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,35 +51,34 @@ P4 = x -> (35*x^4-30*x^2+3)/8
5151
# On the tensor product grid, our function samples are:
5252
F = [(P4(z(θ,φ)y) - P4(xy))/(z(θ,φ)y - xy) for θ in θ, φ in φ]
5353

54-
P = plan_sph2fourier(F);
55-
PA = FastTransforms.plan_analysis(F);
54+
P = plan_sph2fourier(Float64, N)
55+
PA = plan_sph_analysis(Float64, N, M)
5656

5757
# Its spherical harmonic coefficients demonstrate that it is degree-3:
58-
V = zero(F);
59-
A_mul_B!(V, PA, F);
58+
V = PA*F
6059
U3 = P\V
6160

6261
# Similarly, on the tensor product grid, the Legendre polynomial P₄(z⋅y) is:
6362
F = [P4(z(θ,φ)y) for θ in θ, φ in φ]
6463

6564
# Its spherical harmonic coefficients demonstrate that it is exact-degree-4:
66-
A_mul_B!(V, PA, F);
65+
V = PA*F
6766
U4 = P\V
6867

69-
nrm1 = vecnorm(U4);
68+
nrm1 = norm(U4);
7069

7170
# Finally, the Legendre polynomial P₄(z⋅x) is aligned with the grid:
7271
F = [P4(z(θ,φ)x) for θ in θ, φ in φ]
7372

7473
# It only has one nonnegligible spherical harmonic coefficient.
7574
# Can you spot it?
76-
A_mul_B!(V, PA, F);
75+
V = PA*F
7776
U4 = P\V
7877

7978
# That nonnegligible coefficient should be approximately √(2π/(4+1/2)),
8079
# since the convention in this library is to orthonormalize.
8180

82-
nrm2 = vecnorm(U4);
81+
nrm2 = norm(U4);
8382

8483
# Note that the integrals of both functions P₄(z⋅y) and P₄(z⋅x) and their
8584
# L²(𝕊²) norms are the same because of rotational invariance. The integral of

src/ChebyshevJacobiPlan.jl

Lines changed: 0 additions & 209 deletions
This file was deleted.

0 commit comments

Comments
 (0)