class_docstr: Class used to generate new coordinates based on the distorted
  Cauchy-Lorentz distribution. Depending on the steps within the strategy
  chain, the class implements the strategy for generating new location
  changes.
  
  Parameters
  ----------
  lb : array_like
      A 1-D NumPy ndarray containing lower bounds of the generated
      components. Neither NaN or inf are allowed.
  ub : array_like
      A 1-D NumPy ndarray containing upper bounds for the generated
      components. Neither NaN or inf are allowed.
  visiting_param : float
      Parameter for visiting distribution. Default value is 2.62.
      Higher values give the visiting distribution a heavier tail, this
      makes the algorithm jump to a more distant region.
      The value range is (1, 3]. It's value is fixed for the life of the
      object.
  rand_gen : {`~numpy.random.RandomState`, `~numpy.random.Generator`}
      A `~numpy.random.RandomState`, `~numpy.random.Generator` object
      for using the current state of the created random generator container.
class_docstr_tok: ["Class","used","to","generate","new","coordinates","based","on","the","distorted","Cauchy-Lorentz","distribution",".","Depending","on","the","steps","within","the","strategy","chain",",","the","class","implements","the","strategy","for","generating","new","location","changes",".","Parameters","--","--","--","--","--","lb",":","array_like","A","1-D","NumPy","ndarray","containing","lower","bounds","of","the","generated","components",".","Neither","NaN","or","inf","are","allowed",".","ub",":","array_like","A","1-D","NumPy","ndarray","containing","upper","bounds","for","the","generated","components",".","Neither","NaN","or","inf","are","allowed",".","visiting_param",":","float","Parameter","for","visiting","distribution",".","Default","value","is","2.62",".","Higher","values","give","the","visiting","distribution","a","heavier","tail",",","this","makes","the","algorithm","jump","to","a","more","distant","region",".","The","value","range","is","(","1",",","3","]",".","It","'s","value","is","fixed","for","the","life","of","the","object",".","rand_gen",":","{","`","~numpy.random.RandomState","`",",","`","~numpy.random.Generator","`","}","A","`","~numpy.random.RandomState","`",",","`","~numpy.random.Generator","`","object","for","using","the","current","state","of","the","created","random","generator","container","."]
docstr: Formula Visita from p. 405 of reference [2] 
docstr_tok: ["Formula","Visita","from","p.","405","of","reference","[","2","]"]
code: def visit_fn(self, temperature, dim):
      """Formula Visita from p. 405 of reference [2]"""
      x, y = self.rand_gen.normal(size=(dim, 2)).T
  
      factor1 = np.exp(
          np.log(temperature) / (self._visiting_param - 1.0)
      )
      factor4 = self._factor4_p * factor1
  
      # sigmax
      x *= np.exp(
          -(self._visiting_param - 1.0)
          * np.log(self._factor6 / factor4)
          / (3.0 - self._visiting_param)
      )
  
      den = np.exp(
          (self._visiting_param - 1.0)
          * np.log(np.fabs(y))
          / (3.0 - self._visiting_param)
      )
  
      return x / den
  
imports: import numpy
  from scipy.optimize import OptimizeResult
  from scipy.optimize import minimize
  from scipy.special import gammaln
  from scipy._lib._util import check_random_state
label_desc: Use image node_id 3 for calling the VisitingDistribution obj's underlying member method code with example usage: obj.visit_fn(temperature, dim) and returns: unknown