class_docstr: AbstractEnsembleSolver base class for mystic optimizers that are called within
  a parallel map.  This allows pseudo-global coverage of parameter space using
  non-global optimizers.
      
class_docstr_tok: ["AbstractEnsembleSolver","base","class","for","mystic","optimizers","that","are","called","within","a","parallel","map",".","This","allows","pseudo-global","coverage","of","parameter","space","using","non-global","optimizers","."]
docstr: replace allSolvers with solvers found in results
docstr_tok: ["replace","allSolvers","with","solvers","found","in","results"]
code: def __update_allSolvers(self, results):
      """replace allSolvers with solvers found in results"""
      # NOTE: apparently, monitors internal to the solver don't work as well
      # reconnect monitors; save all solvers
      fcalls = [getattr(s, "_fcalls", [0])[0] for s in self._allSolvers]
      from mystic.monitors import Monitor
  
      while (
          results
      ):  # XXX: option to not save allSolvers? skip this and _copy
          _solver, _stepmon, _evalmon = results.pop()
          lr = len(results)
          sm, em = Monitor(), Monitor()
          s = self._allSolvers[lr]
          ls, le = len(s._stepmon), len(s._evalmon)
          # gather old and new results in monitors
          _solver._stepmon[:] = s._stepmon
          sm._x, sm._y, sm._id, sm._info = _stepmon
          _solver._stepmon[ls:] = sm[ls:]
          del sm
          _solver._evalmon[:] = s._evalmon
          em._x, em._y, em._id, em._info = _evalmon
          _solver._evalmon[le:] = em[le:]
          del em
          if not _solver._fcalls[
              0
          ]:  # FIXME: HACK workaround dropped _fcalls
              lm = len(
                  _solver._evalmon
              )  # ...but only works if has evalmon
              _solver._fcalls[0] = fcalls[lr] or (
                  lm if _solver.Terminated() else 0
              )
              # (le if s.Terminated() else 0)
          self._allSolvers[lr] = _solver  # XXX: update not replace?
      return
  
imports: from mystic.monitors import Null
  from mystic.abstract_map_solver import AbstractMapSolver
  from mystic.tools import wrap_function
  from functools import reduce
label_desc: Use image node_id 20 for calling the AbstractEnsembleSolver obj's underlying member method code with example usage: obj.__update_allSolvers(results) without return types