Class Rastrigin

All Implemented Interfaces:
Function<Vector,Double>, RealScalarFunction

public class Rastrigin extends AbstractRealScalarFunction
The Rastrigin function is a non-convex function used as a performance test problem for optimization algorithms. It is a typical example of non-linear multimodal function. Finding the minimum of this function is a fairly difficult problem due to its large search space and its large number of local minima.
See Also:
  • Constructor Details

    • Rastrigin

      public Rastrigin(int dim)
      Constructs a Rastrigin function.
      Parameters:
      dim - the dimension of the Rastrigin function
  • Method Details

    • evaluate

      public Double evaluate(Vector x)
      Description copied from interface: Function
      Evaluate the function f at x, where x is from the domain.
      Parameters:
      x - x
      Returns:
      f(x)