@@ -25,29 +25,34 @@ function show(io::IO,d::Ray)
2525end
2626
2727# # Spaces
28+ _maybetoint (x:: Union{Integer, StaticInt} ) = Int (x)
29+ _maybetoint (x) = x
2830
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
3339end
3440
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
3945end
4046
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))
4455 print (io," )" )
4556end
4657
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-
5358show (io:: IO , S:: NormalizedPolynomialSpace ) = (print (io, " Normalized" ); show (io, S. space))
0 commit comments