44
44
Q = wQ. P
45
45
P = SemiclassicalJacobi (Q. t, Q. a- 1 ,Q. b- 1 ,Q. c- 1 )
46
46
Weighted (P) * ((- sum (orthogonalityweight (Q))/ sum (orthogonalityweight (P))) * (Q \ (D * P))' )
47
+ end
48
+
49
+ @simplify function * (D:: Derivative , HP:: HalfWeighted{:a,<:Any,<:SemiclassicalJacobi} )
50
+ P = HP. P
51
+ Q = SemiclassicalJacobi (P. t, P. a- 1 , P. b+ 1 , P. c+ 1 )
52
+ a = Q. a
53
+ A,B,C = recurrencecoefficients (P)
54
+ α,β,γ = recurrencecoefficients (Q)
55
+ d = AccumulateAbstractVector (* , A ./ α)
56
+ v1 = MulAddAccumulate (Vcat (0 ,0 ,α[2 : ∞] ./ α), Vcat (0 ,β))
57
+ v2 = MulAddAccumulate (Vcat (0 ,0 ,A[2 : ∞] ./ α), Vcat (0 ,B[1 ], B[2 : end ] .* d))
58
+
59
+ HalfWeighted {:a} (Q) * _BandedMatrix (
60
+ Vcat (
61
+ ((a: ∞) .* v2 .- ((a+ 1 ): ∞) .* Vcat (1 ,v1[2 : end ] .* d))' ,
62
+ (((a+ 1 ): ∞) .* Vcat (1 ,d))' ), ℵ₀, 0 ,1 )
63
+ end
64
+
65
+ @simplify function * (D:: Derivative , HP:: HalfWeighted{:b,<:Any,<:SemiclassicalJacobi} )
66
+ P = HP. P
67
+ Q = SemiclassicalJacobi (P. t, P. a+ 1 , P. b- 1 , P. c+ 1 )
68
+ b = Q. b
69
+ A,B,C = recurrencecoefficients (P)
70
+ α,β,γ = recurrencecoefficients (Q)
71
+ d = AccumulateAbstractVector (* , A ./ α)
72
+ d2 = AccumulateAbstractVector (* , A ./ Vcat (1 ,α))
73
+ v1 = MulAddAccumulate (Vcat (0 ,0 ,α[2 : ∞] ./ α), Vcat (0 ,β))
74
+ v2 = MulAddAccumulate (Vcat (0 ,0 ,A[2 : ∞] ./ α), Vcat (0 ,B[1 ], B[2 : end ] .* d))
75
+
76
+ HalfWeighted {:b} (Q) * _BandedMatrix (
77
+ Vcat (
78
+ (- (b: ∞) .* v2 .+ ((b+ 1 ): ∞) .* Vcat (1 ,v1[2 : end ] .* d) .+ Vcat (0 ,(1 : ∞) .* d2))' ,
79
+ (- ((b+ 1 ): ∞) .* Vcat (1 ,d))' ), ℵ₀, 0 ,1 )
80
+ end
81
+
82
+ @simplify function * (D:: Derivative , HP:: HalfWeighted{:c,<:Any,<:SemiclassicalJacobi} )
83
+ P = HP. P
84
+ t = P. t
85
+ Q = SemiclassicalJacobi (t, P. a+ 1 , P. b+ 1 , P. c- 1 )
86
+ c = Q. c
87
+ A,B,C = recurrencecoefficients (P)
88
+ α,β,γ = recurrencecoefficients (Q)
89
+ d = AccumulateAbstractVector (* , A ./ α)
90
+ d2 = AccumulateAbstractVector (* , A ./ Vcat (1 ,α))
91
+ v1 = MulAddAccumulate (Vcat (0 ,0 ,α[2 : ∞] ./ α), Vcat (0 ,β))
92
+ v2 = MulAddAccumulate (Vcat (0 ,0 ,A[2 : ∞] ./ α), Vcat (0 ,B[1 ], B[2 : end ] .* d))
93
+
94
+ HalfWeighted {:c} (Q) * _BandedMatrix (
95
+ Vcat (
96
+ (- (c: ∞) .* v2 .+ ((c+ 1 ): ∞) .* Vcat (1 ,v1[2 : end ] .* d) .+ Vcat (0 ,(t: t: ∞) .* d2))' ,
97
+ (- ((c+ 1 ): ∞) .* Vcat (1 ,d))' ), ℵ₀, 0 ,1 )
47
98
end
0 commit comments