(Mock) gateway to solver that does not perform any external calls and computes the quantity of interest and its jacobian using provided functions. Provided mainly for testing purposes.
r_solver( qoi = function(x) 0, jacobian = function(x) rep(0, length(x)), nparams = NULL, required_args = NULL )
qoi | function to act as the quantity of interest (should return scalar). |
---|---|
jacobian | function to act as the Jacobian matrix for the quantity of
interest (should return vector
of the same lentgh as its parameter and should be the real Jacobian function
for |
nparams | numeric, number of parameters, unspecified if |
required_args | character, mandatory args for |
An object of classes r_solver
and solver
#> $qoi #> [1] 102.25 #> #> $jacobian #> [1] 20 3 #>