@@ -41,50 +41,58 @@ canonicalspace(S::Ultraspherical) = Chebyshev(domain(S))
41
41
pointscompatible (A:: Ultraspherical , B:: Chebyshev ) = domain (A) == domain (B)
42
42
pointscompatible (A:: Chebyshev , B:: Ultraspherical ) = domain (A) == domain (B)
43
43
44
- struct UltrasphericalPlan{CT,FT}
44
+ struct UltrasphericalPlan{CT,FT,IP }
45
45
chebplan:: CT
46
46
cheb2legplan:: FT
47
47
48
- UltrasphericalPlan {CT,FT} (cp,c2lp) where {CT,FT} = new {CT,FT} (cp,c2lp)
48
+ UltrasphericalPlan {CT,FT} (cp,c2lp, :: Val{IP} ) where {CT,FT,IP } = new {CT,FT,IP } (cp,c2lp)
49
49
end
50
50
51
- struct UltrasphericalIPlan{CT,FT}
51
+ struct UltrasphericalIPlan{CT,FT,IP }
52
52
chebiplan:: CT
53
53
leg2chebplan:: FT
54
54
55
- UltrasphericalIPlan {CT,FT} (cp,c2lp) where {CT,FT} = new {CT,FT} (cp,c2lp)
55
+ UltrasphericalIPlan {CT,FT} (cp,c2lp, :: Val{IP} ) where {CT,FT,IP } = new {CT,FT,IP } (cp,c2lp)
56
56
end
57
57
58
- function UltrasphericalPlan (λ:: Number ,vals)
58
+ function UltrasphericalPlan (λ:: Number ,vals,inplace = Val ( false ) )
59
59
if λ == 0.5
60
- cp = plan_transform (Chebyshev (),vals)
60
+ cp = ApproxFunBase . _plan_transform!! (inplace) (Chebyshev (),vals)
61
61
c2lp = plan_cheb2leg (eltype (vals),length (vals))
62
- UltrasphericalPlan {typeof(cp),typeof(c2lp)} (cp,c2lp)
62
+ UltrasphericalPlan {typeof(cp),typeof(c2lp)} (cp,c2lp,inplace )
63
63
else
64
64
error (" Not implemented" )
65
65
end
66
66
end
67
67
68
- function UltrasphericalIPlan (λ:: Number ,cfs)
68
+ function UltrasphericalIPlan (λ:: Number ,cfs,inplace = Val ( false ) )
69
69
if λ == 0.5
70
- cp= plan_itransform (Chebyshev (),cfs)
70
+ cp = ApproxFunBase . _plan_itransform!! (inplace) (Chebyshev (),cfs)
71
71
c2lp= plan_leg2cheb (eltype (cfs),length (cfs))
72
- UltrasphericalIPlan {typeof(cp),typeof(c2lp)} (cp,c2lp)
72
+ UltrasphericalIPlan {typeof(cp),typeof(c2lp)} (cp,c2lp,inplace )
73
73
else
74
74
error (" Not implemented" )
75
75
end
76
76
end
77
77
78
- * (UP:: UltrasphericalPlan ,v:: AbstractVector ) =
78
+ * (UP:: UltrasphericalPlan{<:Any,<:Any,false} ,v:: AbstractVector ) =
79
79
UP. cheb2legplan* (UP. chebplan* v)
80
- * (UP:: UltrasphericalIPlan ,v:: AbstractVector ) =
80
+ * (UP:: UltrasphericalIPlan{<:Any,<:Any,false} ,v:: AbstractVector ) =
81
81
UP. chebiplan* (UP. leg2chebplan* v)
82
82
83
+ * (UP:: UltrasphericalPlan{<:Any,<:Any,true} ,v:: AbstractVector ) =
84
+ lmul! (UP. cheb2legplan, UP. chebplan* v)
85
+ * (UP:: UltrasphericalIPlan{<:Any,<:Any,true} ,v:: AbstractVector ) =
86
+ UP. chebiplan * lmul! (UP. leg2chebplan, v)
83
87
84
88
plan_transform (sp:: Ultraspherical{Int} ,vals:: AbstractVector ) = CanonicalTransformPlan (sp,vals)
89
+ plan_transform! (sp:: Ultraspherical{Int} ,vals:: AbstractVector ) = CanonicalTransformPlan (sp,vals,Val (true ))
85
90
plan_transform (sp:: Ultraspherical ,vals:: AbstractVector ) = UltrasphericalPlan (order (sp),vals)
91
+ plan_transform! (sp:: Ultraspherical ,vals:: AbstractVector ) = UltrasphericalPlan (order (sp),vals,Val (true ))
86
92
plan_itransform (sp:: Ultraspherical{Int} ,cfs:: AbstractVector ) = ICanonicalTransformPlan (sp,cfs)
93
+ plan_itransform! (sp:: Ultraspherical{Int} ,cfs:: AbstractVector ) = ICanonicalTransformPlan (sp,cfs,Val (true ))
87
94
plan_itransform (sp:: Ultraspherical ,cfs:: AbstractVector ) = UltrasphericalIPlan (order (sp),cfs)
95
+ plan_itransform! (sp:: Ultraspherical ,cfs:: AbstractVector ) = UltrasphericalIPlan (order (sp),cfs,Val (true ))
88
96
89
97
# # Construction
90
98
0 commit comments