class_docstr: Deceptive objective function.
  
  This class defines the Deceptive [1]_ global optimization problem. This is a
  multimodal minimization problem defined as follows:
  
  .. math::
  
      f_{\text{Deceptive}}(x) = - \left [\frac{1}{n}
      \sum_{i=1}^{n} g_i(x_i) \right ]^{\beta}
  
  
  Where :math:`\beta` is a fixed non-linearity factor; in this exercise,
  :math:`\beta = 2`. The function :math:`g_i(x_i)` is given by:
  
  .. math::
  
  g_i(x_i) = \begin{cases}
  - \frac{x}{\alpha_i} + \frac{4}{5} &
  \textrm{if} \hspace{5pt} 0 \leq x_i \leq \frac{4}{5} \alpha_i \\
  \frac{5x}{\alpha_i} -4 &
  \textrm{if} \hspace{5pt} \frac{4}{5} \alpha_i \le x_i \leq \alpha_i \\
  \frac{5(x - \alpha_i)}{\alpha_i-1} &
  \textrm{if} \hspace{5pt} \alpha_i \le x_i \leq \frac{1 + 4\alpha_i}{5} \\
  \frac{x - 1}{1 - \alpha_i} &
  \textrm{if} \hspace{5pt} \frac{1 + 4\alpha_i}{5} \le x_i \leq 1
  \end{cases}
  
  
  Here, :math:`n` represents the number of dimensions and :math:`x_i \in
  [0, 1]` for :math:`i = 1, ..., n`.
  
  *Global optimum*: :math:`f(x) = -1` for :math:`x_i = \alpha_i` for
  :math:`i = 1, ..., n`
  
  .. [1] Gavana, A. Global Optimization Benchmarks and AMPGO retrieved 2015
  
  TODO: this function was taken from the Gavana website. The following code
  is based on his code.  His code and the website don't match, the equations
  are wrong.
code: def fun(self, x, *args):
      self.nfev += 1
  
      alpha = arange(1.0, self.N + 1.0) / (self.N + 1.0)
      beta = 2.0
  
      g = zeros((self.N,))
  
      for i in range(self.N):
          if x[i] <= 0.0:
              g[i] = x[i]
          elif x[i] < 0.8 * alpha[i]:
              g[i] = -x[i] / alpha[i] + 0.8
          elif x[i] < alpha[i]:
              g[i] = 5.0 * x[i] / alpha[i] - 4.0
          elif x[i] < (1.0 + 4 * alpha[i]) / 5.0:
              g[i] = 5.0 * (x[i] - alpha[i]) / (alpha[i] - 1.0) + 1.0
          elif x[i] <= 1.0:
              g[i] = (x[i] - 1.0) / (1.0 - alpha[i]) + 4.0 / 5.0
          else:
              g[i] = x[i] - 1.0
  
      return -(((1.0 / self.N) * sum(g)) ** beta)
  
imports: import numpy
  from numpy import abs, cos, exp, arange, pi, sin, sqrt, sum, zeros, tanh
  from numpy.testing import assert_almost_equal
  from .go_benchmark import Benchmark
label_desc: Use image node_id 2 for calling the Deceptive obj's underlying member method code with example usage: obj.fun(x) and returns: unknown