class_docstr: Levy 5 objective function.
  
  This class defines the Levy 5 [1]_ global optimization problem. This
  is a multimodal minimization problem defined as follows:
  
  .. math::
  
      f_{\text{Levy05}}(\mathbf{x}) =
      \sum_{i=1}^{5} i \cos \left[(i-1)x_1 + i \right] \times \sum_{j=1}^{5} j
      \cos \left[(j+1)x_2 + j \right] + (x_1 + 1.42513)^2 + (x_2 + 0.80032)^2
  
  Here, :math:`n` represents the number of dimensions and
  :math:`x_i \in [-10, 10]` for :math:`i=1,...,n`.
  
  *Global optimum*: :math:`f(x_i) = -176.1375779` for
  :math:`\mathbf{x} = [-1.30685, -1.42485]`.
  
  .. [1] Mishra, S. Global Optimization by Differential Evolution and
  Particle Swarm Methods: Evaluation on Some Benchmark Functions.
  Munich Personal RePEc Archive, 2006, 1005
class_docstr_tok: ["Levy","5","objective","function",".","This","class","defines","the","Levy","5","[","1","]","_","global","optimization","problem",".","This","is","a","multimodal","minimization","problem","defined","as","follows",":","..","math",":",":","f_","{","\\text","{","Levy05","}","}","(","\\mathbf","{","x","}",")","=","\\sum_","{","i=1","}","^","{","5","}","i","\\cos","\\left","[","(","i-1",")","x_1","+","i","\\right","]","\\times","\\sum_","{","j=1","}","^","{","5","}","j","\\cos","\\left","[","(","j+1",")","x_2","+","j","\\right","]","+","(","x_1","+","1.42513",")","^2","+","(","x_2","+","0.80032",")","^2","Here",",",":","math",":","`","n","`","represents","the","number","of","dimensions","and",":","math",":","`","x_i","\\in","[","-10",",","10","]","`","for",":","math",":","`","i=1",",","...",",","n","`",".","*","Global","optimum","*",":",":","math",":","`","f","(","x_i",")","=","-176.1375779","`","for",":","math",":","`","\\mathbf","{","x","}","=","[","-1.30685",",","-1.42485","]","`",".","..","[","1","]","Mishra",",","S.","Global","Optimization","by","Differential","Evolution","and","Particle","Swarm","Methods",":","Evaluation","on","Some","Benchmark","Functions",".","Munich","Personal","RePEc","Archive",",","2006",",","1005"]
code: def fun(self, x, *args):
      self.nfev += 1
  
      i = arange(1, 6)
      a = i * cos((i - 1) * x[0] + i)
      b = i * cos((i + 1) * x[1] + i)
  
      return (
          sum(a) * sum(b)
          + (x[0] + 1.42513) ** 2
          + (x[1] + 0.80032) ** 2
      )
  
imports: from numpy import sum, cos, exp, pi, arange, sin
  from .go_benchmark import Benchmark
label_desc: Use image node_id 2 for calling the Levy05 obj's underlying member method code with example usage: obj.fun(x) and returns: unknown