class_docstr: A BMRFO class, inherited from Optimizer.
  
  This is the designed class to define boolean MRFO-related
  variables and methods.
  
  References:
      Publication pending.
class_docstr_tok: ["A","BMRFO","class",",","inherited","from","Optimizer",".","This","is","the","designed","class","to","define","boolean","MRFO-related","variables","and","methods",".","References",":","Publication","pending","."]
docstr: Wraps Boolean Manta Ray Foraging Optimization 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.
      iteration: Current iteration.
      n_iterations: Maximum number of iterations.
docstr_tok: ["Wraps","Boolean","Manta","Ray","Foraging","Optimization","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",".","iteration",":","Current","iteration",".","n_iterations",":","Maximum","number","of","iterations","."]
code: def update(
      self,
      space: Space,
      function: Function,
      iteration: int,
      n_iterations: int,
  ) -> None:
      """Wraps Boolean Manta Ray Foraging Optimization 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.
          iteration: Current iteration.
          n_iterations: Maximum number of iterations.
  
      """
  
      for i, agent in enumerate(space.agents):
          r1 = r.generate_uniform_random_number()
          if r1 < 0.5:
              agent.position = self._cyclone_foraging(
                  space.agents,
                  space.best_agent.position,
                  i,
                  iteration,
                  n_iterations,
              )
          else:
              agent.position = self._chain_foraging(
                  space.agents, space.best_agent.position, i
              )
  
          agent.clip_by_bound()
  
          agent.fit = function(agent.position)
          if agent.fit < space.best_agent.fit:
              space.best_agent.position = copy.deepcopy(agent.position)
              space.best_agent.fit = copy.deepcopy(agent.fit)
  
      for agent in space.agents:
          agent.position = self._somersault_foraging(
              agent.position, space.best_agent.position
          )
  
file_path: opytimizer/opytimizer/optimizers/boolean/bmrfo.py
imports: import copy
  from typing import Any, Dict, List, Optional
  import numpy
  import opytimizer.math.random
  import opytimizer.utils.exception
  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 logging
label_desc: Use image node_id 7 for calling the BMRFO obj's underlying member method code with example usage: obj.update(space, function, iteration, n_iterations) without return types