@@ -539,22 +539,20 @@ chebyshevpoints(n::Integer, kind=Val(1)) = chebyshevpoints(Float64, n, kind)
539
539
# Use `Nothing` and fall back to FFT
540
540
# ##
541
541
542
- for (kind,KIND,IKIND) in ((1 ,FIRSTKIND,IFIRSTKIND),(2 ,SECONDKIND,SECONDKIND))
543
- @eval begin
544
- plan_chebyshevtransform (x:: AbstractArray{T,N} , :: Val{$kind} , dims... ; kws... ) where {T,N} =
545
- ChebyshevTransformPlan {T,$KIND,false,N,Nothing} ()
546
- plan_ichebyshevtransform (x:: AbstractArray{T,N} , :: Val{$kind} , dims... ; kws... ) where {T,N} =
547
- IChebyshevTransformPlan {T,$IKIND,false,N,Nothing} ()
548
-
549
- plan_chebyshevtransform! (x:: AbstractArray{T,N} , :: Val{$kind} , dims... ; kws... ) where {T,N} =
550
- ChebyshevTransformPlan {T,$KIND,true,N,Nothing} ()
551
- plan_ichebyshevtransform! (x:: AbstractArray{T,N} , :: Val{$kind} , dims... ; kws... ) where {T,N} =
552
- IChebyshevTransformPlan {T,$IKIND,true,N,Nothing} ()
553
- end
554
- end
542
+
543
+ plan_chebyshevtransform (x:: AbstractArray{T,N} , :: Val{kind} , dims... ; kws... ) where {T,N,kind} =
544
+ ChebyshevTransformPlan {T,kind,Nothing,false,N,UnitRange{Int}} ()
545
+ plan_ichebyshevtransform (x:: AbstractArray{T,N} , :: Val{kind} , dims... ; kws... ) where {T,N,kind} =
546
+ IChebyshevTransformPlan {T,kind,Nothing,false,N,UnitRange{Int}} ()
547
+
548
+ plan_chebyshevtransform! (x:: AbstractArray{T,N} , :: Val{kind} , dims... ; kws... ) where {T,N,kind} =
549
+ ChebyshevTransformPlan {T,kind,Nothing,true,N,UnitRange{Int}} ()
550
+ plan_ichebyshevtransform! (x:: AbstractArray{T,N} , :: Val{kind} , dims... ; kws... ) where {T,N,kind} =
551
+ IChebyshevTransformPlan {T,kind,Nothing,true,N,UnitRange{Int}} ()
552
+
555
553
556
554
# following Chebfun's @Chebtech1/vals2coeffs.m and @Chebtech2/vals2coeffs.m
557
- function * (P:: ChebyshevTransformPlan{T,FIRSTKIND,false, 1,Nothing} , x:: AbstractVector{T} ) where T
555
+ function * (P:: ChebyshevTransformPlan{T,1,Nothing,false } , x:: AbstractVector{T} ) where T
558
556
n = length (x)
559
557
if n == 1
560
558
x
@@ -568,7 +566,7 @@ function *(P::ChebyshevTransformPlan{T,FIRSTKIND,false,1,Nothing}, x::AbstractVe
568
566
end
569
567
570
568
571
- # function *(P::ChebyshevTransformPlan{T,SECONDKIND,false ,Nothing}, x::AbstractVector{T}) where T
569
+ # function *(P::ChebyshevTransformPlan{T,1,K ,Nothing,false }, x::AbstractVector{T}) where {T,K}
572
570
# n = length(x)
573
571
# if n == 1
574
572
# x
@@ -581,14 +579,14 @@ end
581
579
# end
582
580
583
581
584
- * (P:: ChebyshevTransformPlan{T,FIRSTKIND, true,Nothing } , x:: AbstractVector{T} ) where T =
585
- copyto! (x, ChebyshevTransformPlan {T,FIRSTKIND, false,Nothing } () * x)
582
+ * (P:: ChebyshevTransformPlan{T,1,Nothing, true,N,R } , x:: AbstractVector{T} ) where {T,N,R} =
583
+ copyto! (x, ChebyshevTransformPlan {T,1,Nothing, false,N,R } () * x)
586
584
# *(P::ChebyshevTransformPlan{T,2,true,Nothing}, x::AbstractVector{T}) where T =
587
585
# copyto!(x, ChebyshevTransformPlan{T,2,false,Nothing}() * x)
588
586
589
587
590
588
# following Chebfun's @Chebtech1/vals2coeffs.m and @Chebtech2/vals2coeffs.m
591
- function * (P:: IChebyshevTransformPlan{T,IFIRSTKIND,false, Nothing} , x:: AbstractVector{T} ) where T
589
+ function * (P:: IChebyshevTransformPlan{T,1, Nothing,false } , x:: AbstractVector{T} ) where T
592
590
n = length (x)
593
591
if n == 1
594
592
x
@@ -601,7 +599,7 @@ function *(P::IChebyshevTransformPlan{T,IFIRSTKIND,false,Nothing}, x::AbstractVe
601
599
end
602
600
end
603
601
604
- # function *(P::IChebyshevTransformPlan{T,SECONDKIND,true ,Nothing}, x::AbstractVector{T}) where T
602
+ # function *(P::IChebyshevTransformPlan{T,2,K ,Nothing,true }, x::AbstractVector{T}) where {T,K}
605
603
# n = length(x)
606
604
# if n == 1
607
605
# x
614
612
# end
615
613
# end
616
614
617
- * (P:: IChebyshevTransformPlan{T,IFIRSTKIND, true,Nothing } , x:: AbstractVector{T} ) where T =
618
- copyto! (x, IChebyshevTransformPlan {T,IFIRSTKIND, false,Nothing } () * x)
615
+ * (P:: IChebyshevTransformPlan{T,1,Nothing, true,N,R } , x:: AbstractVector{T} ) where {T,N,R} =
616
+ copyto! (x, IChebyshevTransformPlan {T,1,Nothing, false,N,R } () * x)
619
617
# *(P::IChebyshevTransformPlan{T,SECONDKIND,false,Nothing}, x::AbstractVector{T}) where T =
620
618
# IChebyshevTransformPlan{T,SECONDKIND,true,Nothing}() * copy(x)
0 commit comments