Skip to content

Commit 8e6d750

Browse files
committed
Update jacobi.jl
1 parent d49412b commit 8e6d750

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/classical/jacobi.jl

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ OrthogonalPolynomial(w::JacobiWeight) = Jacobi(w.a, w.b)
122122
orthogonalityweight(P::Jacobi) = JacobiWeight(P.a, P.b)
123123

124124
const WeightedJacobi{T} = WeightedBasis{T,<:JacobiWeight,<:Jacobi}
125+
WeightedJacobi(P::Jacobi{T}) where T = JacobiWeight(zero(T),zero(T)) .* P
125126

126127
"""
127128
HalfWeighted{lr}(Jacobi(a,b))
@@ -320,16 +321,8 @@ function \(A::Jacobi, B::Jacobi)
320321
end
321322
end
322323

323-
function \(A::Jacobi, w_B::WeightedJacobi)
324-
a,b = A.a,A.b
325-
(JacobiWeight(zero(a),zero(b)) .* A) \ w_B
326-
end
327-
328-
function \(w_A::WeightedJacobi, B::Jacobi)
329-
a,b = B.a,B.b
330-
w_A \ (JacobiWeight(zero(a),zero(b)) .* B)
331-
end
332-
324+
\(A::Jacobi, w_B::WeightedJacobi) = WeightedJacobi(A) \ w_B
325+
\(w_A::WeightedJacobi, B::Jacobi) = w_A \ WeightedJacobi(B)
333326
\(A::AbstractJacobi, w_B::WeightedJacobi) = Jacobi(A) \ w_B
334327
\(w_A::WeightedJacobi, B::AbstractJacobi) = w_A \ Jacobi(B)
335328

0 commit comments

Comments
 (0)