docstr: evaluates a 4-D Corana's parabola function for a list of coeffs
  
  f(x) = \sum_(i=0)^(3) f_0(x)
  
  Where for \abs(x_i - z_i) < 0.05:
  f_0(x) = 0.15*(z_i - 0.05*\sign(z_i))^(2) * d_i
  and otherwise:
  f_0(x) = d_i * x_(i)^(2),
  with z_i = \floor(\abs(x_i/0.2)+0.49999)*\sign(x_i)*0.2
  and d_i = 1,1000,10,100.
  
  For len(x) == 1, x = x_0,0,0,0;
  for len(x) == 2, x = x_0,0,x_1,0;
  for len(x) == 3, x = x_0,0,x_1,x_2;
  for len(x) >= 4, x = x_0,x_1,x_2,x_3.
  
  Inspect with mystic_model_plotter using::
      mystic.models.corana -b "-1:1:.01, -1:1:.01" -d -x 1
  
  The minimum is f(x)=0 for \abs(x_i) < 0.05 for all i.
docstr_tok: ["evaluates","a","4-D","Corana","'s","parabola","function","for","a","list","of","coeffs","f","(","x",")","=","\\sum_","(","i=0",")","^","(","3",")","f_0","(","x",")","Where","for","\\abs","(","x_i","-","z_i",")","<","0.05",":","f_0","(","x",")","=","0.15","*","(","z_i","-","0.05","*","\\sign","(","z_i",")",")","^","(","2",")","*","d_i","and","otherwise",":","f_0","(","x",")","=","d_i","*","x_","(","i",")","^","(","2",")",",","with","z_i","=","\\floor","(","\\abs","(","x_i\/0.2",")","+0.49999",")","*","\\sign","(","x_i",")","*","0.2","and","d_i","=","1,1000,10,100",".","For","len","(","x",")","==","1",",","x","=","x_0,0,0,0",";","for","len","(","x",")","==","2",",","x","=","x_0,0",",","x_1,0",";","for","len","(","x",")","==","3",",","x","=","x_0,0",",","x_1",",","x_2",";","for","len","(","x",")",">","=","4",",","x","=","x_0",",","x_1",",","x_2",",","x_3",".","Inspect","with","mystic_model_plotter","using",":",":","mystic.models.corana","-b","``","-1:1",":",".01",",","-1:1",":",".01","''","-d","-x","1","The","minimum","is","f","(","x",")","=0","for","\\abs","(","x_i",")","<","0.05","for","all","i","."]
code: def function(self, coeffs):
      r"""evaluates a 4-D Corana's parabola function for a list of coeffs
  
      f(x) = \sum_(i=0)^(3) f_0(x)
  
      Where for \abs(x_i - z_i) < 0.05:
      f_0(x) = 0.15*(z_i - 0.05*\sign(z_i))^(2) * d_i
      and otherwise:
      f_0(x) = d_i * x_(i)^(2),
      with z_i = \floor(\abs(x_i/0.2)+0.49999)*\sign(x_i)*0.2
      and d_i = 1,1000,10,100.
  
      For len(x) == 1, x = x_0,0,0,0;
      for len(x) == 2, x = x_0,0,x_1,0;
      for len(x) == 3, x = x_0,0,x_1,x_2;
      for len(x) >= 4, x = x_0,x_1,x_2,x_3.
  
      Inspect with mystic_model_plotter using::
          mystic.models.corana -b "-1:1:.01, -1:1:.01" -d -x 1
  
      The minimum is f(x)=0 for \abs(x_i) < 0.05 for all i."""
      d = [1.0, 1000.0, 10.0, 100.0]
      _d = [0, 3, 1, 2]  # ordering for lower dimensions
      # x = asarray(coeffs) #XXX: converting to numpy.array slows by 10x
      x = [0.0] * 4  # ensure that there are 4 coefficients
      if len(coeffs) < 4:
          _x = x[:]
          _x[: len(coeffs)] = coeffs
          for i in range(4):
              x[_d.index(i)] = _x[i]
      else:
          x = coeffs
      r = 0
      for j in range(4):
          zj = floor(abs(x[j] / 0.2) + 0.49999) * sign(x[j]) * 0.2
          if abs(x[j] - zj) < 0.05:
              r += 0.15 * pow(zj - 0.05 * sign(zj), 2) * d[j]
          else:
              r += d[j] * x[j] * x[j]
      return r
  
file_path: mystic/mystic/models/storn.py
imports: from .abstract_model import AbstractFunction
  from numpy import asarray
  from math import pow, cos, sqrt
  from numpy import sign, floor
label_desc: Use image node_id 2 for calling the Corana obj's underlying member method code with example usage: obj.function(coeffs) and returns: r