Calls the UCMINF optimizer with a compiled C++ objective function
that has been wrapped in an Rcpp::XPtr<ucminf::ObjFun>.
This path bypasses the R interpreter on every function evaluation,
giving maximum performance for non-trivial objectives.
Usage
ucminf_xptr(par, xptr, control = list(), hessian = 0)Arguments
- par
Numeric starting vector.
- xptr
An
externalptrcreated by wrapping aucminf::ObjFun*inRcpp::XPtr<ucminf::ObjFun>.- control
A named list of control parameters (see
ucminf), or aucminf_controlobject.- hessian
Integer: 0 = none, 2 = inv-Hessian, 3 = both.
Value
A list of class "ucminf" (same structure as ucminf).