R/functions.R

##
## functions.R - Test functions
##
## Author:
##  Olaf Mersmann (OME) <olafm@statistik.tu-dortmund.de>
##

genShiftedRosenbrock <- function(o, bias) {
  f <- function(x) {
    z <- x - o + 1
    d <- length(z)
    hz <- z[1:(d-1)]
    tz <- z[2:d]
    s <- sum(100 * (hz^2 - tz)^2 + (hz - 1)^2)
    return(s + bias)
  }
  return(f)    
}

Try the cmaes package in your browser

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

cmaes documentation built on May 2, 2019, 6:53 p.m.