Skip to content

Commit 6c7398f

Browse files
committed
test ==
1 parent 7265934 commit 6c7398f

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/jacobi.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@ HalfWeighted{lr}(P) where lr = HalfWeighted{lr,eltype(P),typeof(P)}(P)
158158
axes(Q::HalfWeighted) = axes(Q.P)
159159
copy(Q::HalfWeighted) = Q
160160

161-
==(A::HalfWeighted, B::HalfWeighted) = A.P == B.P
161+
==(A::HalfWeighted{lr}, B::HalfWeighted{lr}) where lr = A.P == B.P
162+
==(A::HalfWeighted, B::HalfWeighted) = false
162163

163164
convert(::Type{WeightedOrthogonalPolynomial}, Q::HalfWeighted{:a,T,<:Jacobi}) where T = JacobiWeight(Q.P.a,zero(T)) .* Q.P
164165
convert(::Type{WeightedOrthogonalPolynomial}, Q::HalfWeighted{:b,T,<:Jacobi}) where T = JacobiWeight(zero(T),Q.P.b) .* Q.P

test/test_jacobi.jl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using ClassicalOrthogonalPolynomials, FillArrays, BandedMatrices, ContinuumArrays, QuasiArrays, LazyArrays, LazyBandedMatrices, FastGaussQuadrature, Test
2-
import ClassicalOrthogonalPolynomials: recurrencecoefficients, basis, MulQuasiMatrix, arguments, Weighted, HalfWeighted
2+
import ClassicalOrthogonalPolynomials: recurrencecoefficients, basis, MulQuasiMatrix, arguments, Weighted, HalfWeighted, WeightedOrthogonalPolynomial
33

44
@testset "Jacobi" begin
55
@testset "JacobiWeight" begin
@@ -377,5 +377,12 @@ import ClassicalOrthogonalPolynomials: recurrencecoefficients, basis, MulQuasiMa
377377
@test (D * HalfWeighted{:b}(Normalized(B)) * (Normalized(B) \ exp.(x)))[0.1] (b + 1+0.1) * (1+0.1)^(b-1)*exp(0.1)
378378

379379
@test (D * Weighted(Jacobi(0,0.1)))[0.1,1:10] (D * HalfWeighted{:b}(Jacobi(0,0.1)))[0.1,1:10]
380+
@test (D * Weighted(Jacobi(0.1,0)))[0.1,1:10] (D * HalfWeighted{:a}(Jacobi(0.1,0)))[0.1,1:10]
381+
382+
@test HalfWeighted{:a}(Jacobi(0.2,0.1))  HalfWeighted{:b}(Jacobi(0.2,0.1))
383+
@test HalfWeighted{:a}(Jacobi(0.2,0.1)) == HalfWeighted{:a}(Jacobi(0.2,0.1))
384+
385+
@test convert(WeightedOrthogonalPolynomial, HalfWeighted{:a}(Normalized(Jacobi(0.1,0.2))))[0.1,1:10]
386+
HalfWeighted{:a}(Normalized(Jacobi(0.1,0.2)))[0.1,1:10]
380387
end
381388
end

0 commit comments

Comments
 (0)