Revision 04bbc417cf2927b827660bc07743429783569aec authored by HwB on 10 February 2013, 00:00:00 UTC, committed by Gabor Csardi on 10 February 2013, 00:00:00 UTC
1 parent 0e3ae6b
rosenbrock.R
##
## r o s e n b r o c k . R Test Functions
##
rastrigin <- function(x) {
n <- length(x)
10*n + sum(x^2 - 10*cos(2*pi*x))
}
rosenbrock <- function(x) {
n <- length(x)
x1 <- x[2:n]
x2 <- x[1:(n-1)]
sum(100*(x1-x2^2)^2 + (1-x2)^2)
}
Computing file changes ...