Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

trefethen

Trefethen and Wagon Test Functions


Description

Test functions for global optimization posed for the SIAM 100-digit challenge in 2002 by Nick Trefethen, Oxford University, UK.

Usage

fnTrefethen(p2)
fnWagon(p3)

Arguments

p2

Numerical vector of length 2.

p3

Numerical vector of length 3.

Details

These are highly nonlinear and oscillating functions in two and three dimensions with thousands of local mimima inside the unit square resp. cube (i.e., [-1, 1] x [-1, 1] or [-1, 1] x [-1, 1] x [-1, 1]).

Value

Function value is a single real number.

Author(s)

HwB <hwborchers@googlemail.com>

References

F. Bornemann, D. Laurie, S. Wagon, and J. Waldvogel (2004). The SIAM 100-Digit Challenge: A Study in High-Accuracy Numerical Computing. Society for Industrial and Applied Mathematics.

Examples

x <- 2*runif(5) - 1
  fnTrefethen(x)
  fnWagon(x)

  ## Not run: 
  T <- matrix(NA, nrow=1001, ncol=1001)
  for (i in 1:1001) {
    for (j in 1:1001) {
        T[i, j] <- fnTrefethen(c(x[i], y[j]))
    }
  }
  image(x, y, T)
  contour(x, y, T, add=TRUE)
  
## End(Not run)

adagio

Discrete and Global Optimization Routines

v0.8.4
GPL (>= 3)
Authors
Hans W. Borchers [aut, cre]
Initial release
2021-04-30

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.