Skip to content

Commit dea4504

Browse files
committed
Add orthogonal connection matrices
1 parent 8462dd4 commit dea4504

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

test/test_ultraspherical.jl

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using ClassicalOrthogonalPolynomials, ContinuumArrays, BandedMatrices, LazyArrays, Test
22
using ForwardDiff
33
using LazyArrays: rowsupport, colsupport
4-
using ClassicalOrthogonalPolynomials: grammatrix
4+
using ClassicalOrthogonalPolynomials: grammatrix, OrthonormalWeighted
55

66
@testset "Ultraspherical" begin
77
@testset "Conversion" begin
@@ -204,4 +204,22 @@ using ClassicalOrthogonalPolynomials: grammatrix
204204
@test (C \ diff(U,1))[1:10,1:10] == (C \ diff(U))[1:10,1:10]
205205
@test (C³ \ diff(U,2))[1:10,1:10] == (C³ \ diff(diff(U)))[1:10,1:10]
206206
end
207+
208+
@testset "orthonormal" begin
209+
P = OrthonormalWeighted(Ultraspherical(1/2))
210+
W = OrthonormalWeighted(Ultraspherical(3/2))
211+
@test P'P == W'W == I
212+
P\W
213+
214+
Q = Normalized(Legendre()) \ (JacobiWeight(1,1) .* Normalized(Jacobi(2,2)))
215+
@test Q[1:12,1:10]'Q[1:12,1:10] I
216+
217+
c = sqrt.(2*(5:2:∞) ./ ((3:∞) .* (4:∞) ))
218+
s = sqrt.(((1:∞) .* (2:∞)) ./ ((3:∞) .* (4:∞) ))
219+
220+
@test (c.^2 + s.^2)[1:10] ones(10)
221+
G₁
222+
223+
224+
end
207225
end

0 commit comments

Comments
 (0)