this used by the
cost function are consistent.
optimbase.checkcostfun(this = NULL)nbineqconst
element > 0) and the use of derivatives (withderivatives element set to
TRUE), this function makes several cost function calls with different
index value (see vignette('optimbase',package='optimbase') for
more details about index). If at least one call fails, the function
stops the search algorithm. Following every successful cost function call, optimbase.checkcostfun
calls optimbase.checkshape to check the dimensions of the matrix
returned by the cost function against some expectations.
optimbase.checkshape