class_docstr: Differential Evolution optimization.
      
class_docstr_tok: ["Differential","Evolution","optimization","."]
docstr: perform a single optimization iteration
  
  Args:
      cost (func, default=None): objective, of form ``y = cost(x, *ExtraArgs)``,
        where ``x`` is a candidate solution vector
      ExtraArgs (tuple, default=None): tuple of positional arguments required to
        evaluate the objective
  
  Returns:
      None
  
  Notes:
      - This method accepts additional ``kwds`` that are specific for the current
        solver, as detailed in the ``_process_inputs`` method.
          
docstr_tok: ["perform","a","single","optimization","iteration","Args",":","cost","(","func",",","default=None",")",":","objective",",","of","form","``","y","=","cost","(","x",",","*","ExtraArgs",")","``",",","where","``","x","``","is","a","candidate","solution","vector","ExtraArgs","(","tuple",",","default=None",")",":","tuple","of","positional","arguments","required","to","evaluate","the","objective","Returns",":","None","Notes",":","-","This","method","accepts","additional","``","kwds","``","that","are","specific","for","the","current","solver",",","as","detailed","in","the","``","_process_inputs","``","method","."]
code: def _Step(self, cost=None, ExtraArgs=None, **kwds):
      """perform a single optimization iteration
  
      Args:
          cost (func, default=None): objective, of form ``y = cost(x, *ExtraArgs)``,
            where ``x`` is a candidate solution vector
          ExtraArgs (tuple, default=None): tuple of positional arguments required to
            evaluate the objective
  
      Returns:
          None
  
      Notes:
          - This method accepts additional ``kwds`` that are specific for the current
            solver, as detailed in the ``_process_inputs`` method.
      """
      # process and activate input settings
      settings = self._process_inputs(kwds)
      # (hardwired: due to python exec'ing to locals())
      callback = (
          settings["callback"] if "callback" in settings else None
      )
      disp = settings["disp"] if "disp" in settings else False
      strategy = (
          settings["strategy"]
          if "strategy" in settings
          else self.strategy
      )
  
      # HACK to enable not explicitly calling _decorate_objective
      cost = self._bootstrap_objective(cost, ExtraArgs)
  
      init = False  # flag to do 0th iteration 'post-initialization'
  
      if not len(self._stepmon):  # do generation = 0
          init = True
          strategy = None
          self.population[0] = asfarray(self.population[0])
          # decouple bestSolution from population and bestEnergy from popEnergy
          bs = self.population[0]
          self.bestSolution = (
              bs.copy() if hasattr(bs, "copy") else bs[:]
          )
          self.bestEnergy = self.popEnergy[0]
          del bs
  
      if self._useStrictRange:
          from mystic.constraints import and_
  
          constraints = and_(
              self._constraints,
              self._strictbounds,
              onfail=self._strictbounds,
          )
      else:
          constraints = self._constraints
  
      for candidate in range(self.nPop):
          if not len(self._stepmon):
              # generate trialSolution (within valid range)
              self.trialSolution[:] = self.population[candidate]
          if strategy:
              # generate trialSolution (within valid range)
              strategy(self, candidate)
          # apply constraints
          self.trialSolution[:] = constraints(self.trialSolution)
          # apply penalty
          # trialEnergy = self._penalty(self.trialSolution)
          # calculate cost
          trialEnergy = cost(self.trialSolution)
  
          # trialEnergy should be a scalar
          if isiterable(trialEnergy) and len(trialEnergy) == 1:
              trialEnergy = trialEnergy[0]
              # for len(trialEnergy) > 1, will throw ValueError below
  
          if trialEnergy < self.popEnergy[candidate]:
              # New low for this candidate
              self.popEnergy[candidate] = trialEnergy
              self.population[candidate][:] = self.trialSolution
              self.UpdateGenealogyRecords(
                  candidate, self.trialSolution[:]
              )
  
              # Check if all-time low
              if trialEnergy < self.bestEnergy:
                  self.bestEnergy = trialEnergy
                  self.bestSolution[:] = self.trialSolution
  
      # log bestSolution and bestEnergy (includes penalty)
      self._stepmon(self.bestSolution[:], self.bestEnergy, self.id)
      # if savefrequency matches, then save state
      self._AbstractSolver__save_state()
  
      # do callback
      if callback is not None:
          callback(self.bestSolution)
      # initialize termination conditions, if needed
      if init:
          self._termination(self)  # XXX: at generation 0 or always?
      return
  
imports: from mystic.tools import wrap_function, unpair, isiterable
  from mystic.tools import wrap_bounds, wrap_penalty, reduced
  from mystic.abstract_solver import AbstractSolver
  from mystic.abstract_map_solver import AbstractMapSolver
  from numpy import asfarray, ravel
  from collections.abc import Callable
label_desc: Use image node_id 5 for calling the DifferentialEvolutionSolver obj's underlying member method code with example usage: obj._Step(cost, ExtraArgs) without return types