This function is normally only for internal use, but is exported to aid users in debugging their created rescomp_param objects.

get_params(param_obj, t)

Arguments

param_obj

An object of class rescomp_param.

t

The time at which to get the parameters.

Value

A numeric vector of length 1; the parameter value.

Examples

# Repeated pulsing and exponential decay
antibiotic_conc <- rescomp_param_custom(function(t) {
  0.5^(10 * (t %% 1))
})
get_params(antibiotic_conc, 0)
#> [1] 1
get_params(antibiotic_conc, 0.5)
#> [1] 0.03125
get_params(antibiotic_conc, 1)
#> [1] 1

params <- rescomp_param_list(r = 0.2, antibiotic_conc = antibiotic_conc)
get_params(params, 0.5)
#> $r
#> [1] 0.2
#> 
#> $antibiotic_conc
#> [1] 0.03125
#>