@@ -24,29 +24,29 @@ valsdomain_type_promote(::Type{Dual{T}},::Type{Complex{V}}) where {T<:Complex,V<
24
24
Dual{promote_type (T,Complex{V})},Complex{promote_type (real (T),V)}
25
25
26
26
27
- plan_chebyshevtransform! (x:: Vector {T} , _ ) where {T<: Dual } =
27
+ plan_chebyshevtransform! (x:: AbstractVector {T} , :: Val ) where {T<: Dual } =
28
28
error (" In-place variant not implemented for Dual" )
29
29
30
- plan_ichebyshevtransform! (x:: Vector {T} , _ ) where {T<: Dual } =
30
+ plan_ichebyshevtransform! (x:: AbstractVector {T} , :: Val ) where {T<: Dual } =
31
31
error (" In-place variant not implemented for Dual" )
32
32
33
33
34
- plan_chebyshevtransform (v:: Vector {D} , kind) where {D<: Dual } = plan_chebyshevtransform (realpart .(v), kind)
35
- plan_ichebyshevtransform (v:: Vector {D} , kidn ) where {D<: Dual } = plan_ichebyshevtransform (realpart .(v), kind)
34
+ plan_chebyshevtransform (v:: AbstractVector {D} , :: Val{ kind} ) where {D<: Dual ,kind } = plan_chebyshevtransform (realpart .(v), Val ( kind) )
35
+ plan_ichebyshevtransform (v:: AbstractVector {D} , :: Val{kind} ) where {D<: Dual ,kind } = plan_ichebyshevtransform (realpart .(v), Val ( kind) )
36
36
37
37
38
38
39
- * (P:: ChebyshevTransformPlan ,v:: Vector {D} ) where {k,D<: Dual } = dual .(P* realpart .(v),P* dualpart .(v))
39
+ * (P:: ChebyshevTransformPlan ,v:: AbstractVector {D} ) where {k,D<: Dual } = dual .(P* realpart .(v),P* dualpart .(v))
40
40
41
41
# TODO : Hardy{false}
42
42
for (OP,TransPlan) in ((:plan_transform ,:TransformPlan ),(:plan_itransform ,:ITransformPlan )),
43
43
TYP in (:Fourier ,:Laurent ,:SinSpace )
44
44
@eval begin
45
- function $OP (sp:: $TYP{D} ,x:: Vector {T} ) where {T<: Dual ,D<: Domain }
45
+ function $OP (sp:: $TYP{D} ,x:: AbstractVector {T} ) where {T<: Dual ,D<: Domain }
46
46
plan = $ OP (sp,realpart .(x))
47
47
$ TransPlan {T,typeof(sp),false,typeof(plan)} (sp,plan)
48
48
end
49
- * (P:: $TransPlan{T,$TYP{D},false} ,x:: Vector {T} ) where {T<: Dual ,D<: Domain } =
49
+ * (P:: $TransPlan{T,$TYP{D},false} ,x:: AbstractVector {T} ) where {T<: Dual ,D<: Domain } =
50
50
dual (P. plan* realpart .(x),P. plan* dualpart .(x))
51
51
end
52
52
end
@@ -55,7 +55,7 @@ chop!(f::Fun,d::Dual)=chop!(f,realpart(d))
55
55
56
56
57
57
58
- function simplifycfs! (cfs:: Vector {DD} ,tol:: Float64 = 4E-16 ) where DD<: Dual
58
+ function simplifycfs! (cfs:: AbstractVector {DD} ,tol:: Float64 = 4E-16 ) where DD<: Dual
59
59
for k= length (cfs): - 2 : 2
60
60
if maximum (abs,realpart .(cfs[k- 1 : k])) > maximum (abs,dualpart .(cfs[k- 1 : k]))* tol
61
61
return resize! (cfs,k)
0 commit comments