class_docstr: A FFOA class, inherited from Optimizer.
  
  This is the designed class to define FFOA-related
  variables and methods.
  
  References:
      W.-T. Pan. A new Fruit Fly Optimization Algorithm: Taking the financial distress model as an example.
      Knowledge-Based Systems (2012).
class_docstr_tok: ["A","FFOA","class",",","inherited","from","Optimizer",".","This","is","the","designed","class","to","define","FFOA-related","variables","and","methods",".","References",":","W.-T.","Pan",".","A","new","Fruit","Fly","Optimization","Algorithm",":","Taking","the","financial","distress","model","as","an","example",".","Knowledge-Based","Systems","(","2012",")","."]
docstr: Wraps Fruit-Fly Optimization Algorithm 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","Fruit-Fly","Optimization","Algorithm","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 Fruit-Fly Optimization Algorithm 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.
  
      """
  
      for a, x_axis, y_axis in zip(
          space.agents, self.x_axis, self.y_axis
      ):
          r1 = r.generate_uniform_random_number()
          r2 = r.generate_uniform_random_number()
  
          # Shakes the `x` and `y` axis positions (eq. 2)
          x = x_axis.position + r1
          y = y_axis.position + r2
  
          # Calculates the distance between axis (eq. 3 - top)
          distance = np.sqrt(x**2 + y**2)
  
          # Calculates the smell's position (eq. 3 - bottom)
          s = 1 / (distance + c.EPSILON)
  
          # Evaluates the smell's position (eq. 4)
          smell = function(s)
  
          if smell < a.fit:
              # Updates its corresponding `axis` positions (eq. 6)
              x_axis.position = copy.deepcopy(x)
              y_axis.position = copy.deepcopy(y)
  
              a.position = copy.deepcopy(s)
              a.fit = copy.deepcopy(smell)
  
imports: import copy
  from typing import Any, Dict, List, Optional
  import numpy
  import opytimizer.math.random
  import opytimizer.utils.constant
  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 FFOA obj's underlying member method code with example usage: obj.update(space, function) without return types