@@ -7,46 +7,46 @@ using FastTransforms
77
88# first kind points -> first kind polynomials
99n = 20
10- p_1 = chebyshevpoints (Float64, n; kind = 1 )
10+ p_1 = chebyshevpoints (Float64, n, Val ( 1 ) )
1111f = exp .(p_1)
12- f̌ = chebyshevtransform (f; kind = 1 )
12+ f̌ = chebyshevtransform (f, Val ( 1 ) )
1313
1414f̃ = x -> [cos (k* acos (x)) for k= 0 : n- 1 ]' * f̌
1515f̃ (0.1 ) ≈ exp (0.1 )
1616
1717# first kind polynomials -> first kind points
18- ichebyshevtransform (f̌; kind = 1 ) ≈ exp .(p_1)
18+ ichebyshevtransform (f̌, Val ( 1 ) ) ≈ exp .(p_1)
1919
2020# second kind points -> first kind polynomials
21- p_2 = chebyshevpoints (Float64, n; kind = 2 )
21+ p_2 = chebyshevpoints (Float64, n, Val ( 2 ) )
2222f = exp .(p_2)
23- f̌ = chebyshevtransform (f; kind = 2 )
23+ f̌ = chebyshevtransform (f, Val ( 2 ) )
2424
2525f̃ = x -> [cos (k* acos (x)) for k= 0 : n- 1 ]' * f̌
2626f̃ (0.1 ) ≈ exp (0.1 )
2727
2828# first kind polynomials -> second kind points
29- ichebyshevtransform (f̌; kind = 2 ) ≈ exp .(p_2)
29+ ichebyshevtransform (f̌, Val ( 2 ) ) ≈ exp .(p_2)
3030
3131
3232# first kind points -> second kind polynomials
3333n = 20
34- p_1 = chebyshevpoints (Float64, n; kind = 1 )
34+ p_1 = chebyshevpoints (Float64, n, Val ( 1 ) )
3535f = exp .(p_1)
36- f̌ = chebyshevutransform (f; kind = 1 )
36+ f̌ = chebyshevutransform (f, Val ( 1 ) )
3737f̃ = x -> [sin ((k+ 1 )* acos (x))/ sin (acos (x)) for k= 0 : n- 1 ]' * f̌
3838f̃ (0.1 ) ≈ exp (0.1 )
3939
4040# second kind polynomials -> first kind points
41- ichebyshevutransform (f̌; kind = 1 ) ≈ exp .(p_1)
41+ ichebyshevutransform (f̌, Val ( 1 ) ) ≈ exp .(p_1)
4242
4343
4444# second kind points -> second kind polynomials
45- p_2 = chebyshevpoints (Float64, n; kind = 2 )[2 : n- 1 ]
45+ p_2 = chebyshevpoints (Float64, n, Val ( 2 ) )[2 : n- 1 ]
4646f = exp .(p_2)
47- f̌ = chebyshevutransform (f; kind = 2 )
47+ f̌ = chebyshevutransform (f, Val ( 2 ) )
4848f̃ = x -> [sin ((k+ 1 )* acos (x))/ sin (acos (x)) for k= 0 : n- 3 ]' * f̌
4949f̃ (0.1 ) ≈ exp (0.1 )
5050
5151# second kind polynomials -> second kind points
52- ichebyshevutransform (f̌; kind = 2 ) ≈ exp .(p_2)
52+ ichebyshevutransform (f̌, Val ( 2 ) ) ≈ exp .(p_2)
0 commit comments