class_docstr: A WWO class, inherited from Optimizer.
  
  This is the designed class to define WWO-related
  variables and methods.
  
  References:
      Y.-J. Zheng. Water wave optimization: A new nature-inspired metaheuristic.
      Computers & Operations Research (2015).
docstr: Wraps Water Wave Optimization over all agents and variables.
  
  Args:
      space: Space containing agents and update-related information.
      function: A function object.
docstr_tok: ["Wraps","Water","Wave","Optimization","over","all","agents","and","variables",".","Args",":","space",":","Space","containing","agents","and","update-related","information",".","function",":","A","function","object","."]
code: def update(self, space: Space, function: Function) -> None:
      """Wraps Water Wave Optimization over all agents and variables.
  
      Args:
          space: Space containing agents and update-related information.
          function: A function object.
  
      """
  
      for i, agent in enumerate(space.agents):
          # Propagates a wave into a new temporary one (eq. 6)
          wave = self._propagate_wave(agent, function, i)
          if wave.fit < agent.fit:
              if wave.fit < space.best_agent.fit:
                  space.best_agent.position = copy.deepcopy(
                      wave.position
                  )
                  space.best_agent.fit = copy.deepcopy(wave.fit)
  
                  k = r.generate_integer_random_number(
                      1, self.k_max + 1
                  )
                  for j in range(k):
                      # Breaks the propagated wave (eq. 10)
                      broken_wave = self._break_wave(wave, function, j)
                      if broken_wave.fit < space.best_agent.fit:
                          space.best_agent.position = copy.deepcopy(
                              broken_wave.position
                          )
                          space.best_agent.fit = copy.deepcopy(
                              broken_wave.fit
                          )
  
              agent.position = copy.deepcopy(wave.position)
              agent.fit = copy.deepcopy(wave.fit)
  
              self.height[i] = self.h_max
          else:
              self.height[i] -= 1
  
              if self.height[i] == 0:
                  # Refracts the wave and generates a new height and wave length (eq. 8-9)
                  self.height[i], self.length[i] = self._refract_wave(
                      agent, space.best_agent, function, i
                  )
  
      # Updates the wave length for all agents (eq. 7)
      self._update_wave_length(space.agents)
  
imports: import copy
  from typing import Any, Dict, List, Optional, Tuple
  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 19 for calling the WWO obj's underlying member method code with example usage: obj.update(space, function) without return types