@@ -276,6 +276,19 @@ function update(trace, args::Tuple, argdiffs::Tuple, ::ChoiceMap)
276276 error (" Not implemented" )
277277end
278278
279+ """
280+ (new_trace, weight, retdiff, discard) = update(trace, constraints::ChoiceMap)
281+
282+ Shorthand variant of
283+ [`update`](@ref update(::Any, ::Tuple, ::Tuple, ::ChoiceMap))
284+ which assumes the arguments are unchanged.
285+ """
286+ function update (trace, constraints:: ChoiceMap )
287+ args = get_args (trace)
288+ argdiffs = Tuple (NoChange () for _ in args)
289+ return update (trace, args, argdiffs, constraints)
290+ end
291+
279292"""
280293 (new_trace, weight, retdiff) = regenerate(trace, args::Tuple, argdiffs::Tuple,
281294 selection::Selection)
@@ -307,6 +320,19 @@ function regenerate(trace, args::Tuple, argdiffs::Tuple, selection::Selection)
307320 error (" Not implemented" )
308321end
309322
323+ """
324+ (new_trace, weight, retdiff) = regenerate(trace, selection::Selection)
325+
326+ Shorthand variant of
327+ [`regenerate`](@ref regenerate(::Any, ::Tuple, ::Tuple, ::Selection))
328+ which assumes the arguments are unchanged.
329+ """
330+ function regenerate (trace, selection:: Selection )
331+ args = get_args (trace)
332+ argdiffs = Tuple (NoChange () for _ in args)
333+ return regenerate (trace, args, argdiffs, selection)
334+ end
335+
310336"""
311337 arg_grads = accumulate_param_gradients!(trace, retgrad=nothing, scale_factor=1.)
312338
0 commit comments