Skip to content

Commit 68e66d3

Browse files
authored
Weighed - mapped OP grammatrix (#159)
1 parent 71ebfc3 commit 68e66d3

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ClassicalOrthogonalPolynomials"
22
uuid = "b30e2e7b-c4ee-47da-9d5f-2c5c27239acd"
33
authors = ["Sheehan Olver <[email protected]>"]
4-
version = "0.11.8"
4+
version = "0.11.9"
55

66
[deps]
77
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"

src/ClassicalOrthogonalPolynomials.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ function weightedgrammatrix_layout(::MappedOPLayout, P)
210210
end
211211

212212
grammatrix_layout(::MappedOPLayout, P) = grammatrix_layout(MappedBasisLayout(), P)
213+
grammatrix_layout(::WeightedOPLayout{MappedOPLayout}, P) = grammatrix_layout(MappedBasisLayout(), P)
213214

214215
OrthogonalPolynomial(w::Weight) =error("Override for $(typeof(w))")
215216

test/test_jacobi.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,12 @@ import ClassicalOrthogonalPolynomials: recurrencecoefficients, basis, MulQuasiMa
172172
@test (D * (JacobiWeight(c,a) .* P))[0.1,1:5] ((JacobiWeight(c,a) .* P)[0.1+h,1:5]-(JacobiWeight(c,a) .* P)[0.1,1:5])/h atol=1E-5
173173
@test (D * (JacobiWeight(c,a) .* P))[0.1,1:5] (D * (JacobiWeight(c,a) .* Legendre()))[0.1,1:5]
174174
end
175+
176+
@testset "grammatrix" begin
177+
W = Weighted(jacobi(1,1,0..1))
178+
M = grammatrix(W)
179+
@test M[1:10,1:10] == grammatrix(Weighted(Jacobi(1,1)))[1:10,1:10]/2
180+
end
175181
end
176182

177183
@testset "functions" begin

0 commit comments

Comments
 (0)