@@ -142,10 +142,15 @@ end
142
142
get_contents (ex:: ParametricExpression ) = ex. tree
143
143
get_metadata (ex:: ParametricExpression ) = ex. metadata
144
144
get_tree (ex:: ParametricExpression ) = ex. tree
145
- function get_operators (ex:: ParametricExpression , operators= nothing )
145
+ function get_operators (
146
+ ex:: ParametricExpression , operators:: Union{AbstractOperatorEnum,Nothing} = nothing
147
+ )
146
148
return operators === nothing ? ex. metadata. operators : operators
147
149
end
148
- function get_variable_names (ex:: ParametricExpression , variable_names= nothing )
150
+ function get_variable_names (
151
+ ex:: ParametricExpression ,
152
+ variable_names:: Union{Nothing,AbstractVector{<:AbstractString}} = nothing ,
153
+ )
149
154
return variable_names === nothing ? ex. metadata. variable_names : variable_names
150
155
end
151
156
@inline _copy_with_nothing (x) = copy (x)
@@ -241,7 +246,10 @@ function eval_tree_array(::ParametricExpression{T}, ::AbstractMatrix{T}, operato
241
246
end
242
247
# ! format: on
243
248
function (ex:: ParametricExpression )(
244
- X:: AbstractMatrix{T} , classes:: AbstractVector{<:Integer} , operators= nothing ; kws...
249
+ X:: AbstractMatrix{T} ,
250
+ classes:: AbstractVector{<:Integer} ,
251
+ operators:: Union{AbstractOperatorEnum,Nothing} = nothing ;
252
+ kws... ,
245
253
) where {T}
246
254
(output, flag) = eval_tree_array (ex, X, classes, operators; kws... ) # Will error
247
255
if ! flag
@@ -253,7 +261,7 @@ function eval_tree_array(
253
261
ex:: ParametricExpression{T} ,
254
262
X:: AbstractMatrix{T} ,
255
263
classes:: AbstractVector{<:Integer} ,
256
- operators= nothing ;
264
+ operators:: Union{AbstractOperatorEnum,Nothing} = nothing ;
257
265
kws... ,
258
266
) where {T}
259
267
@assert length (classes) == size (X, 2 )
0 commit comments