Skip to content

Commit 51f505e

Browse files
authored
Merge pull request #4 from putianyi889/master
Update Chebyshev.jl
2 parents 71a14c4 + b3c5fb5 commit 51f505e

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/Spaces/Chebyshev/Chebyshev.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ Chebyshev(d) = Chebyshev(Domain(d))
2525
NormalizedChebyshev() = NormalizedPolynomialSpace(Chebyshev())
2626
NormalizedChebyshev(d) = NormalizedPolynomialSpace(Chebyshev(d))
2727

28+
function Base.getproperty(S::Chebyshev{<:Any,<:Any},v::Symbol)
29+
if v==:b || v==:a
30+
-0.5
31+
else
32+
getfield(S,v)
33+
end
34+
end
35+
2836
normalization(::Type{T}, sp::Chebyshev, k::Int) where T = T(π)/(2-FastTransforms.δ(k,0))
2937

3038
Space(d::SegmentDomain) = Chebyshev(d)

test/ChebyshevTest.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,4 +202,10 @@ using ApproxFunOrthogonalPolynomials, ApproxFunBase, LinearAlgebra, Test
202202
f = 1/(1 + 25*(x^2))
203203
@test norm(f, Inf) 1.0
204204
end
205+
206+
@testset "Jacobi" begin
207+
S=Chebyshev()
208+
@test S.a==-0.5
209+
@test S.b==-0.5
210+
end
205211
end

0 commit comments

Comments
 (0)