@@ -228,7 +228,7 @@ Base.:-(k::ShiftIndex, i::Int) = k + (-i)
228
228
229
229
Return the time-domain type (`Continuous` or `InferredDiscrete`) that `op` operates on.
230
230
"""
231
- function input_timedomain (s:: Shift , arg)
231
+ function input_timedomain (s:: Shift , arg = nothing )
232
232
if has_time_domain (arg)
233
233
return get_time_domain (arg)
234
234
end
@@ -240,26 +240,26 @@ end
240
240
241
241
Return the time-domain type (`Continuous` or `InferredDiscrete`) that `op` results in.
242
242
"""
243
- function output_timedomain (s:: Shift , arg)
243
+ function output_timedomain (s:: Shift , arg = nothing )
244
244
if has_time_domain (t, arg)
245
245
return get_time_domain (t, arg)
246
246
end
247
247
InferredDiscrete
248
248
end
249
249
250
- input_timedomain (:: Sample , _) = Continuous
251
- output_timedomain (s:: Sample , _) = s. clock
250
+ input_timedomain (:: Sample , _ = nothing ) = Continuous
251
+ output_timedomain (s:: Sample , _ = nothing ) = s. clock
252
252
253
- function input_timedomain (h:: Hold , arg)
253
+ function input_timedomain (h:: Hold , arg = nothing )
254
254
if has_time_domain (arg)
255
255
return get_time_domain (arg)
256
256
end
257
257
InferredDiscrete # the Hold accepts any discrete
258
258
end
259
- output_timedomain (:: Hold , _) = Continuous
259
+ output_timedomain (:: Hold , _ = nothing ) = Continuous
260
260
261
- sampletime (_, op:: Sample , _) = sampletime (op. clock)
262
- sampletime (_, op:: ShiftIndex , _) = sampletime (op. clock)
261
+ sampletime (op:: Sample , _ = nothing ) = sampletime (op. clock)
262
+ sampletime (op:: ShiftIndex , _ = nothing ) = sampletime (op. clock)
263
263
264
264
changes_domain (op) = isoperator (op, Union{Sample, Hold})
265
265
0 commit comments