class_docstr: AbstractSolver base class for mystic optimizers.
      
class_docstr_tok: ["AbstractSolver","base","class","for","mystic","optimizers","."]
docstr: Minimize a 'cost' function with given termination conditions.
  
  Uses an optimization algorithm to find the minimum of a function of one or
  more variables.
  
  Args:
      cost (func, default=None): the function to be minimized: ``y = cost(x)``.
      termination (termination, default=None): termination conditions.
      ExtraArgs (tuple, default=None): extra arguments for cost.
      sigint_callback (func, default=None): callback function for signal handler.
      callback (func, default=None): function to call after each iteration. The
          interface is ``callback(xk)``, with xk the current parameter vector.
      disp (bool, default=False): if True, print convergence messages.
  
  Returns:
      None
          
code: def Solve(self, cost=None, termination=None, ExtraArgs=None, **kwds):
      """Minimize a 'cost' function with given termination conditions.
  
      Uses an optimization algorithm to find the minimum of a function of one or
      more variables.
  
      Args:
          cost (func, default=None): the function to be minimized: ``y = cost(x)``.
          termination (termination, default=None): termination conditions.
          ExtraArgs (tuple, default=None): extra arguments for cost.
          sigint_callback (func, default=None): callback function for signal handler.
          callback (func, default=None): function to call after each iteration. The
              interface is ``callback(xk)``, with xk the current parameter vector.
          disp (bool, default=False): if True, print convergence messages.
  
      Returns:
          None
      """
      # process and activate input settings
      if "sigint_callback" in kwds:
          self.sigint_callback = kwds["sigint_callback"]
          del kwds["sigint_callback"]
      else:
          self.sigint_callback = None
      settings = self._process_inputs(kwds)
  
      # set up signal handler #FIXME: sigint doesn't behave well in parallel
      self._EARLYEXIT = False  # XXX: why not use EARLYEXIT singleton?
  
      # activate signal handler
      # import threading as thread
      # mainthread = isinstance(thread.current_thread(), thread._MainThread)
      # if mainthread: #XXX: if not mainthread, signal will raise ValueError
      import mystic._signal as signal
  
      if self._handle_sigint:
          signal.signal(signal.SIGINT, signal.Handler(self))
  
      # register: cost, termination, ExtraArgs
      cost = self._bootstrap_objective(cost, ExtraArgs)
      if termination is not None:
          self.SetTermination(termination)
      # XXX: self.Step(cost, termination, ExtraArgs, **settings) ?
  
      # run the optimizer to termination
      self._Solve(cost, ExtraArgs, **settings)
  
      # restore default handler for signal interrupts
      if self._handle_sigint:
          signal.signal(signal.SIGINT, signal.default_int_handler)
      return
  
imports: import random
  import numpy
  from numpy import inf, shape, asarray, absolute, asfarray, seterr
  from mystic.tools import wrap_function, wrap_nested, wrap_reducer
  from mystic.tools import wrap_bounds, wrap_penalty, reduced
  from klepto import isvalid, validate
  from collections.abc import Callable
label_desc: Use image node_id 49 for calling the AbstractSolver obj's underlying member method code with example usage: obj.Solve(cost, termination, ExtraArgs) without return types