class_docstr: A FPA class, inherited from Optimizer.
  
  This is the designed class to define FPA-related
  variables and methods.
  
  References:
      X.-S. Yang. Flower pollination algorithm for global optimization.
      International conference on unconventional computing and natural computation (2012).
docstr: Wraps Flower Pollination 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","Flower","Pollination","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 Flower Pollination 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 agent in space.agents:
          a = copy.deepcopy(agent)
  
          r1 = r.generate_uniform_random_number()
          if r1 > self.p:
              a.position = self._global_pollination(
                  agent.position, space.best_agent.position
              )
          else:
              epsilon = r.generate_uniform_random_number()
  
              k = r.generate_integer_random_number(0, len(space.agents))
              l = r.generate_integer_random_number(
                  0, len(space.agents), exclude_value=k
              )
  
              a.position = self._local_pollination(
                  agent.position,
                  space.agents[k].position,
                  space.agents[l].position,
                  epsilon,
              )
          a.clip_by_bound()
  
          a.fit = function(a.position)
          if a.fit < agent.fit:
              agent.position = copy.deepcopy(a.position)
              agent.fit = copy.deepcopy(a.fit)
  
imports: import copy
  from typing import Any, Dict, Optional
  import numpy
  import opytimizer.math.distribution
  import opytimizer.math.random
  import opytimizer.utils.exception
  from opytimizer.core import Optimizer
  from opytimizer.core.function import Function
  from opytimizer.core.space import Space
  from opytimizer.utils import logging
label_desc: Use image node_id 10 for calling the FPA obj's underlying member method code with example usage: obj.update(space, function) without return types