Skip to content

Commit 125a34b

Browse files
expand tests
1 parent acd4f4e commit 125a34b

File tree

1 file changed

+34
-13
lines changed

1 file changed

+34
-13
lines changed

test/libfasttransformstests.jl

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ FastTransforms.set_num_threads(ceil(Int, Base.Sys.CPU_THREADS/2))
66
n = 64
77
α, β, γ, δ, λ, μ = 0.1, 0.2, 0.3, 0.4, 0.5, 0.6
88
for T in (Float32, Float64, BigFloat)
9+
x = T(1)./(1:n)
910
Id = Matrix{T}(I, n, n)
1011
for (p1, p2) in ((plan_leg2cheb(Id), plan_cheb2leg(Id)),
1112
(plan_ultra2ultra(Id, T(λ), T(μ)), plan_ultra2ultra(Id, T(μ), T(λ))),
@@ -14,20 +15,40 @@ FastTransforms.set_num_threads(ceil(Int, Base.Sys.CPU_THREADS/2))
1415
(plan_jac2ultra(Id, T(α), T(β), T(λ)), plan_ultra2jac(Id, T(λ), T(α), T(β))),
1516
(plan_jac2cheb(Id, T(α), T(β)), plan_cheb2jac(Id, T(α), T(β))),
1617
(plan_ultra2cheb(Id, T(λ)), plan_cheb2ultra(Id, T(λ))))
17-
P = deepcopy(Id)
18-
Q = p1*P
19-
P = p2*Q
20-
@test P Id
21-
Q = p1*P
22-
P = p1'Q
23-
Q = p1'\P
24-
P = p1\Q
25-
@test P Id
18+
y = p1*x
19+
z = p2*y
20+
@test z x
21+
y = p1*x
22+
z = p1'y
23+
y = transpose(p1)*z
24+
z = transpose(p1)\y
25+
y = p1'\z
26+
z = p1\y
27+
@test z x
28+
y = p2*x
29+
z = p2'y
30+
y = transpose(p2)*z
31+
z = transpose(p2)\y
32+
y = p2'\z
33+
z = p2\y
34+
@test z x
35+
P = p1*Id
2636
Q = p2*P
27-
P = p2'Q
28-
Q = p2'\P
29-
P = p2\Q
30-
@test P Id
37+
@test Q Id
38+
P = p1*Id
39+
Q = p1'P
40+
P = transpose(p1)*Q
41+
Q = transpose(p1)\P
42+
P = p1'\Q
43+
Q = p1\P
44+
@test Q Id
45+
P = p2*Id
46+
Q = p2'P
47+
P = transpose(p2)*Q
48+
Q = transpose(p2)\P
49+
P = p2'\Q
50+
Q = p2\P
51+
@test Q Id
3152
end
3253
end
3354

0 commit comments

Comments
 (0)