@@ -25,29 +25,34 @@ function show(io::IO,d::Ray)
25
25
end
26
26
27
27
# # Spaces
28
+ _maybetoint (x:: Union{Integer, StaticInt} ) = Int (x)
29
+ _maybetoint (x) = x
28
30
29
- function show (io:: IO , S:: Chebyshev )
30
- print (io, " Chebyshev(" )
31
- show (io,domain (S))
32
- print (io," )" )
31
+ _spacename (io, :: Chebyshev ) = print (io, " Chebyshev(" )
32
+ _spacename (io, S:: Ultraspherical ) = print (io," Ultraspherical(" , _maybetoint (order (S)))
33
+ function _spacename (io, S:: Jacobi )
34
+ if S. a == S. b == 0
35
+ print (io," Legendre(" )
36
+ else
37
+ print (io," Jacobi(" , _maybetoint (S. b), " ," , _maybetoint (S. a))
38
+ end
33
39
end
34
40
35
- function show (io:: IO , S :: Ultraspherical )
36
- print (io, " Ultraspherical( " , order (S), " , " )
37
- show (io,domain (S) )
38
- print (io, " ) " )
41
+ function _maybeshowdomain (io, d )
42
+ if ! (d isa ChebyshevInterval )
43
+ show (io, d )
44
+ end
39
45
end
40
46
41
- function show (io:: IO ,S:: Jacobi )
42
- S. a == S. b == 0 ? print (io," Legendre(" ) : print (io," Jacobi(" , S. b, " ," , S. a," ," )
43
- show (io,domain (S))
47
+ _showsorders (C:: Chebyshev ) = false
48
+ _showsorders (C:: Ultraspherical ) = true
49
+ _showsorders (C:: Jacobi ) = ! (C. b == 0 && C. a == 0 )
50
+
51
+ function show (io:: IO , S:: Union{Chebyshev, Ultraspherical, Jacobi} )
52
+ _spacename (io, S)
53
+ ! (domain (S) isa ChebyshevInterval) && _showsorders (S) && print (io, " ," )
54
+ _maybeshowdomain (io, domain (S))
44
55
print (io," )" )
45
56
end
46
57
47
- show (io:: IO , S:: Chebyshev{<:ChebyshevInterval} ) = print (io, " Chebyshev()" )
48
- show (io:: IO , S:: Ultraspherical{<:Any,<:ChebyshevInterval} ) =
49
- print (io, " Ultraspherical(" , order (S), " )" )
50
- show (io:: IO , S:: Jacobi{<:ChebyshevInterval} ) =
51
- S. a == S. b == 0 ? print (io," Legendre()" ) : print (io," Jacobi(" , S. b, " ," , S. a," )" )
52
-
53
58
show (io:: IO , S:: NormalizedPolynomialSpace ) = (print (io, " Normalized" ); show (io, S. space))
0 commit comments