class_docstr: A BH class, inherited from Optimizer.
  
  This is the designed class to define BH-related
  variables and methods.
  
  References:
      A. Hatamlou. Black hole: A new heuristic optimization approach for data clustering.
      Information Sciences (2013).
docstr: Wraps Black Hole over all agents and variables.
  
  Args:
      space: Space containing agents and update-related information.
      function: A Function object that will be used as the objective function.
docstr_tok: ["Wraps","Black","Hole","over","all","agents","and","variables",".","Args",":","space",":","Space","containing","agents","and","update-related","information",".","function",":","A","Function","object","that","will","be","used","as","the","objective","function","."]
code: def update(self, space: Space, function: Function) -> None:
      """Wraps Black Hole over all agents and variables.
  
      Args:
          space: Space containing agents and update-related information.
          function: A Function object that will be used as the objective function.
  
      """
  
      # Updates stars position and calculate their cost (eq. 3)
      cost = self._update_position(
          space.agents, space.best_agent, function
      )
  
      # Performs the Event Horizon (eq. 4)
      self._event_horizon(space.agents, space.best_agent, cost)
  
file_path: opytimizer/opytimizer/optimizers/science/bh.py
imports: from typing import Any, Dict, List, Optional
  import numpy
  import opytimizer.math.random
  from opytimizer.core import Optimizer
  from opytimizer.core.agent import Agent
  from opytimizer.core.function import Function
  from opytimizer.core.space import Space
  from opytimizer.utils import constant, logging
label_desc: Use image node_id 4 for calling the BH obj's underlying member method code with example usage: obj.update(space, function) without return types