R/jac_or_grad.R

jac_or_grad <- function(sgrad, jac, options) {
  imfil_least_squares <- options$least_squares
  if (imfil_least_squares == 1) {
    sdiff <- jac
  } else if (imfil_least_squares == 0) {
    sdiff <- sgrad
  } else {
    stop("jac_or_grad: wrong least_squares")
  }
  sdiff
}

Try the rImfil package in your browser

Any scripts or data that you put into this service are public.

rImfil documentation built on May 2, 2019, 4:46 p.m.