@@ -35,8 +35,11 @@ const Expansion2d{S <: Number,T,D,C} = Expansion{SVector{2,S},T,D,C}
3535const Expansion3d{S <: Number ,T,D,C} = Expansion{SVector{3 ,S},T,D,C}
3636const Expansion4d{S <: Number ,T,D,C} = Expansion{SVector{4 ,S},T,D,C}
3737
38- @forward Expansion. dictionary domaintype, prectype, dimension,
39- size, Span, support, interpolation_grid, numtype,
38+ prectype (F:: Type{<:Expansion{S,T}} ) where {S,T} = prectype (S,T)
39+ numtype (F:: Type{<:Expansion{S,T}} ) where {S,T} = numtype (S,T)
40+
41+ @forward Expansion. dictionary domaintype, dimension,
42+ size, Span, support, interpolation_grid,
4043 ncomponents,
4144 measure
4245
@@ -127,7 +130,14 @@ adjoint(f::Expansion) = differentiate(f)
127130
128131∫ (f:: Expansion ) = antidifferentiate (f)
129132
130- roots (f:: Expansion ) = expansion_roots (dictionary (f), coefficients (f))
133+ function roots (f:: Expansion ; all = true )
134+ r = expansion_roots (dictionary (f), coefficients (f))
135+ if all
136+ r
137+ else
138+ restrict_to_domain (r, support (f))
139+ end
140+ end
131141
132142show (io:: IO , mime:: MIME"text/plain" , fun:: Expansion ) = composite_show (io, mime, fun)
133143Display. displaystencil (fun:: Expansion ) = [" Expansion(" , dictionary (fun), " , " , coefficients (fun), " )" ]
0 commit comments