Skip to content

Commit 1785d96

Browse files
committed
increase cov
1 parent 777621f commit 1785d96

File tree

8 files changed

+18
-5
lines changed

8 files changed

+18
-5
lines changed

src/ClassicalOrthogonalPolynomials.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,6 @@ singularities(w) = singularities_layout(MemoryLayout(w), w)
213213

214214
struct NoSingularities end
215215

216-
singularitiesview(w, ::Inclusion) = w # for now just assume it doesn't change
217-
singularitiesview(w, ind) = view(w, ind)
218-
singularitiesview(::NoSingularities, ind) = NoSingularities()
219-
singularitiesview(::NoSingularities, ::Inclusion) = NoSingularities()
220216

221217

222218
basis_axes(ax::Inclusion{<:Any,<:AbstractInterval}, v) = convert(AbstractQuasiMatrix{eltype(v)}, basis_singularities(ax, singularities(v)))

src/classical/chebyshev.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,12 @@ broadcasted(::LazyQuasiArrayStyle{2}, ::typeof(*), ::ChebyshevWeight{kind,T}, ::
4949

5050
chebyshevt() = ChebyshevT()
5151
chebyshevt(d::AbstractInterval{T}) where T = ChebyshevT{float(T)}()[affine(d, ChebyshevInterval{T}()), :]
52+
chebyshevt(d::ChebyshevInterval{T}) where T = ChebyshevT{float(T)}()
5253
chebyshevt(d::Inclusion) = chebyshevt(d.domain)
5354
chebyshevt(S::AbstractQuasiMatrix) = chebyshevt(axes(S,1))
5455
chebyshevu() = ChebyshevU()
5556
chebyshevu(d::AbstractInterval{T}) where T = ChebyshevU{float(T)}()[affine(d, ChebyshevInterval{T}()), :]
57+
chebyshevu(d::ChebyshevInterval{T}) where T = ChebyshevU{float(T)}()
5658
chebyshevu(d::Inclusion) = chebyshevu(d.domain)
5759
chebyshevu(S::AbstractQuasiMatrix) = chebyshevu(axes(S,1))
5860

src/classical/jacobi.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ for op in (:+, :*)
103103
@eval singularitiesbroadcast(::typeof($op), ::NoSingularities, ::NoSingularities, ::NoSingularities) = NoSingularities()
104104
end
105105

106-
singularitiesbroadcast(::typeof(*), V::SubQuasiArray...) = singularitiesbroadcast(*, map(parent,V)...)[parentindices(V...)...]
107106
singularitiesbroadcast(::typeof(*), ::NoSingularities, b) = b
108107
singularitiesbroadcast(::typeof(*), a, ::NoSingularities) = a
109108

src/classical/ultraspherical.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ orthogonalityweight(C::Ultraspherical) = UltrasphericalWeight(C.λ)
5656

5757
ultrasphericalc(n::Integer, λ, z) = Base.unsafe_getindex(Ultraspherical{polynomialtype(typeof(λ),typeof(z))}(λ), z, n+1)
5858
ultraspherical(λ, d::AbstractInterval{T}) where T = Ultraspherical{float(promote_type(eltype(λ),T))}(λ)[affine(d,ChebyshevInterval{T}()), :]
59+
ultraspherical(λ, d::ChebyshevInterval{T}) where T = Ultraspherical{float(promote_type(eltype(λ),T))}(λ)
5960

6061
==(a::Ultraspherical, b::Ultraspherical) = a.λ == b.λ
6162
==(::Ultraspherical, ::ChebyshevT) = false

test/test_chebyshev.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,11 @@ import BandedMatrices: isbanded
582582
@testset "diff of truncation" begin
583583
@test MemoryLayout(diff(ChebyshevT()[:,1:5]) * randn(5)) isa ExpansionLayout
584584
end
585+
586+
@testset "ChebyshevInterval constructior" begin
587+
@test chebyshevt(ChebyshevInterval()) ChebyshevT()
588+
@test chebyshevu(ChebyshevInterval()) ChebyshevU()
589+
end
585590
end
586591

587592
struct QuadraticMap{T} <: Map{T} end

test/test_jacobi.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,4 +557,8 @@ import ClassicalOrthogonalPolynomials: recurrencecoefficients, basis, MulQuasiMa
557557
@test singularities(JacobiWeight(1,2) .* Jacobi(2,3)) == JacobiWeight(1,2)
558558
@test singularities(jacobiweight(1,2,1..2) .* jacobi(2,3,1..2)) == singularities(view(JacobiWeight(1,2) .* Jacobi(2,3), affine(1..2, -1..1),:)) == jacobiweight(1,2,1..2)
559559
end
560+
561+
@testset "ChebyshevInterval constructior" begin
562+
@test jacobi(1,2,ChebyshevInterval()) Jacobi(1,2)
563+
end
560564
end

test/test_legendre.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,4 +222,7 @@ import QuasiArrays: MulQuasiArray
222222
@testset "fill" begin
223223
@test basis(expand(fill(2, Inclusion(1..2)))) == legendre(1..2)
224224
end
225+
@testset "ChebyshevInterval constructior" begin
226+
@test legendre(ChebyshevInterval()) Legendre()
227+
end
225228
end

test/test_ultraspherical.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,4 +204,7 @@ 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+
@testset "ChebyshevInterval constructior" begin
208+
@test ultraspherical(2,ChebyshevInterval()) Ultraspherical(2)
209+
end
207210
end

0 commit comments

Comments
 (0)