class_docstr: Class that implements within a Markov chain the strategy for location
  acceptance and local search decision making.
  
  Parameters
  ----------
  acceptance_param : float
      Parameter for acceptance distribution. It is used to control the
      probability of acceptance. The lower the acceptance parameter, the
      smaller the probability of acceptance. Default value is -5.0 with
      a range (-1e4, -5].
  visit_dist : VisitingDistribution
      Instance of `VisitingDistribution` class.
  func_wrapper : ObjectiveFunWrapper
      Instance of `ObjectiveFunWrapper` class.
  minimizer_wrapper: LocalSearchWrapper
      Instance of `LocalSearchWrapper` class.
  rand_state : RandomState object
      A numpy.random.RandomState object for using the current state of the
      created random generator container.
  energy_state: EnergyState
      Instance of `EnergyState` class.
class_docstr_tok: ["Class","that","implements","within","a","Markov","chain","the","strategy","for","location","acceptance","and","local","search","decision","making",".","Parameters","--","--","--","--","--","acceptance_param",":","float","Parameter","for","acceptance","distribution",".","It","is","used","to","control","the","probability","of","acceptance",".","The","lower","the","acceptance","parameter",",","the","smaller","the","probability","of","acceptance",".","Default","value","is","-5.0","with","a","range","(","-1e4",",","-5","]",".","visit_dist",":","VisitingDistribution","Instance","of","`","VisitingDistribution","`","class",".","func_wrapper",":","ObjectiveFunWrapper","Instance","of","`","ObjectiveFunWrapper","`","class",".","minimizer_wrapper",":","LocalSearchWrapper","Instance","of","`","LocalSearchWrapper","`","class",".","rand_state",":","RandomState","object","A","numpy.random.RandomState","object","for","using","the","current","state","of","the","created","random","generator","container",".","energy_state",":","EnergyState","Instance","of","`","EnergyState","`","class","."]
code: def accept_reject(self, j, e, x_visit):
      r = self._rand_state.random_sample()
      pqv_temp = (
          (self.acceptance_param - 1.0)
          * (e - self.energy_state.current_energy)
          / (self.temperature_step + 1.0)
      )
      if pqv_temp <= 0.0:
          pqv = 0.0
      else:
          pqv = np.exp(np.log(pqv_temp) / (1.0 - self.acceptance_param))
      if r <= pqv:
          # We accept the new location and update state
          self.energy_state.update_current(e, x_visit)
          self.xmin = np.copy(self.energy_state.current_location)
  
      # No improvement for a long time
      if self.not_improved_idx >= self.not_improved_max_idx:
          if j == 0 or self.energy_state.current_energy < self.emin:
              self.emin = self.energy_state.current_energy
              self.xmin = np.copy(self.energy_state.current_location)
  
imports: from __future__ import division, print_function, absolute_import
  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 2 for calling the StrategyChain obj's underlying member method code with example usage: obj.accept_reject(j, e, x_visit) without return types