@@ -17,46 +17,3 @@ function clenshawcurtisweights!(μ::Vector{T}, plan) where T
17
17
μ[1 ] *= half (T); μ[N] *= half (T)
18
18
return μ
19
19
end
20
-
21
-
22
-
23
- # Chebyshev-T coefficients to values at Clenshaw-Curtis nodes
24
-
25
- applyTN_plan (x) = length (x) > 1 ? FFTW. plan_r2r! (x, FFTW. REDFT00) : fill! (similar (x),1 )'
26
-
27
- applyTN! (x:: Vector{T} ) where {T<: AbstractFloat } = applyTN! (x,applyTN_plan (x))
28
-
29
- function applyTN! (x:: Vector{T} ,plan) where T<: AbstractFloat
30
- x[1 ] *= 2 ; x[end ] *= 2
31
- plan* x
32
- rmul! (x,half (T))
33
- end
34
- applyTN (x:: Vector{T} ,plan) where {T<: AbstractFloat } = applyTN! (copy (x),plan)
35
- applyTN (x:: Vector{T} ) where {T<: AbstractFloat } = applyTN! (copy (x))
36
-
37
- # Values at Clenshaw-Curtis nodes to Chebyshev-T coefficients
38
-
39
- applyTNinv_plan (x) = length (x) > 1 ? FFTW. plan_r2r! (x, FFTW. REDFT00) : fill! (similar (x),1 )'
40
-
41
- applyTNinv! (x:: Vector{T} ) where {T<: AbstractFloat } = applyTNinv! (x,applyTNinv_plan (x))
42
-
43
- function applyTNinv! (x:: Vector{T} ,plan) where T<: AbstractFloat
44
- plan* x
45
- x[1 ] /= 2 ;x[end ] /= 2
46
- rmul! (x,inv (length (x)- one (T)))
47
- end
48
- applyTNinv (x:: Vector{T} ,plan) where {T<: AbstractFloat } = applyTNinv! (copy (x),plan)
49
- applyTNinv (x:: Vector{T} ) where {T<: AbstractFloat } = applyTNinv! (copy (x))
50
-
51
- # sin(nθ) coefficients to values at Clenshaw-Curtis nodes except ±1
52
-
53
- applyUN_plan (x) = length (x) > 0 ? FFTW. plan_r2r! (x, FFTW. RODFT00) : fill! (similar (x),1 )'
54
-
55
- applyUN! (x:: AbstractVector{T} ) where {T<: AbstractFloat } = applyUN! (x,applyUN_plan (x))
56
-
57
- function applyUN! (x:: AbstractVector{T} ,plan) where T<: AbstractFloat
58
- plan* x
59
- rmul! (x,half (T))
60
- end
61
- applyUN (x:: AbstractVector{T} ,plan) where {T<: AbstractFloat } = applyUN! (copy (x),plan)
62
- applyUN (x:: AbstractVector{T} ) where {T<: AbstractFloat } = applyUN! (copy (x))
0 commit comments