@@ -304,17 +304,14 @@ function \(A::Zernike{T}, B::Zernike{V}) where {T,V}
304
304
TV = promote_type (T,V)
305
305
A. a == B. a && A. b == B. b && return Eye {TV} ((axes (A,2 ),))
306
306
st = Int (A. a - B. a + A. b - B. b)
307
- ModalInterlace {TV} ((Normalized .(Jacobi {TV} .(A. b,A. a: ∞)) .\ Normalized .(Jacobi {TV} .(B. b,B. a: ∞))) .* sqrt ( convert (TV, 2 )^ (- st) ), (ℵ₀,ℵ₀), (0 ,2 st))
307
+ ModalInterlace {TV} ((Normalized .(Jacobi {TV} .(A. b,A. a: ∞)) .\ Normalized .(Jacobi {TV} .(B. b,B. a: ∞))) .* convert (TV, 2 )^ (- st/ 2 ), (ℵ₀,ℵ₀), (0 ,2 st))
308
308
end
309
309
310
- function \ (A:: Zernike{T} , B :: Weighted{V,Zernike{V}} ) where {T,V}
310
+ function \ (A:: Zernike{T} , wB :: Weighted{V,Zernike{V}} ) where {T,V}
311
311
TV = promote_type (T,V)
312
- A. a == B. P. a == A. b == B. P. b == 0 && return Eye {TV} ((axes (A,2 ),))
313
- if A. a == A. b == 0
314
- @assert B. P. a == 0 && B. P. b == 1
315
- ModalInterlace {TV} ((Normalized .(Jacobi {TV} .(0 , 0 : ∞)) .\ HalfWeighted {:a} .(Normalized .(Jacobi {TV} .(1 , 0 : ∞)))) ./ sqrt (convert (TV, 2 )), (ℵ₀,ℵ₀), (2 ,0 ))
316
- else
317
- Z = Zernike {TV} ()
318
- (A \ Z) * (Z \ B)
319
- end
312
+ B = wB. P
313
+ A. a == B. a == A. b == B. b == 0 && return Eye {TV} ((axes (A,2 ),))
314
+ c = Int (B. a - A. a + B. b - A. b)
315
+ @assert iszero (B. a)
316
+ ModalInterlace {TV} ((Normalized .(Jacobi {TV} .(A. b, A. a: ∞)) .\ HalfWeighted {:a} .(Normalized .(Jacobi {TV} .(B. b, B. a: ∞)))) .* convert (TV, 2 )^ (- c/ 2 ), (ℵ₀,ℵ₀), (2 Int (B. b), 2 Int (A. a+ A. b)))
320
317
end
0 commit comments