Setups with every automatic differentiation backend
Source:R/devtools-workprecision.R
with_autodiff_variants.Rdwith_autodiff_variants(setups, ad_backends) returns the setups tagged
<tag_prefix>_default, each followed (for algorithms with an autodiff
option) by one variant per backend: the algorithm with that backend,
named "<name> (<Backend>)" and tagged <tag_prefix>_<backend> (such as
autodiff_finitediff).
Arguments
- setups
List of setups.
- ad_backends
List of backends such as
AutoFiniteDiff().- tag_prefix
Prefix of the tags.
Examples
v <- with_autodiff_variants(list(list(alg = Rodas5P()), list(alg = Tsit5())),
ad_backends = list(AutoFiniteDiff(), AutoForwardDiff()))
vapply(v, function(s) if (is.null(s$name)) "" else s$name, "")
#> [1] "" "Rodas5P (FiniteDiff)" "Rodas5P (ForwardDiff)"
#> [4] ""