Skip to content

Commit 495b5ed

Browse files
committed
singularities on onclusion
1 parent 332a6d2 commit 495b5ed

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/ClassicalOrthogonalPolynomials.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ singularities(::WeightedOPLayout, a) = singularities(weight(a))
167167
singularities(w) = singularities(MemoryLayout(w), w)
168168
singularities(::ExpansionLayout, f) = singularities(basis(f))
169169

170-
singularities(S::SubQuasiArray) = singularities(parent(S))[parentindices(S)[1]]
170+
singularitiesview(w, ::Inclusion) = w # for now just assume it doesn't change
171+
singularities(S::SubQuasiArray) = singularitiesview(singularities(parent(S)), parentindices(S)[1])
171172

172173
basis(lay, v, ax::Inclusion{<:Any,<:AbstractInterval}) = _basis(singularities(v))
173174

test/test_legendre.jl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,17 @@ import QuasiArrays: MulQuasiArray
8686
@test W isa Clenshaw
8787
@test W * [1; 2; zeros(∞)] P \ (w .* (P[:,1:2] * [1,2]))
8888

89+
f = expand(P, exp)
90+
@test (w .* f)[0.1] w[0.1]exp(0.1)
91+
8992
M = P'P
9093
@test M isa Diagonal
9194
@test P'x [0; 2/3; zeros(∞)]
92-
@test P'exp.(x) M * (P\exp.(x))
95+
@test P'f M * (P\f)
96+
97+
v = f.args[2]
98+
@test v'*M isa Adjoint
99+
@test v'*M*v dot(f,f) f'f
93100
end
94101

95102
@testset "test on functions" begin

0 commit comments

Comments
 (0)