class_docstr: An LOA class, inherited from Optimizer.
  
  This is the designed class to define LOA-related
  variables and methods.
  
  References:
      M. Yazdani and F. Jolai. Lion Optimization Algorithm (LOA): A nature-inspired metaheuristic algorithm.
      Journal of Computational Design and Engineering (2016).
class_docstr_tok: ["An","LOA","class",",","inherited","from","Optimizer",".","This","is","the","designed","class","to","define","LOA-related","variables","and","methods",".","References",":","M.","Yazdani","and","F.","Jolai",".","Lion","Optimization","Algorithm","(","LOA",")",":","A","nature-inspired","metaheuristic","algorithm",".","Journal","of","Computational","Design","and","Engineering","(","2016",")","."]
docstr: Wraps the mating operator.
  
  Args:
      agent: Current agent.
      males: List of males that will be breed.
      function: A Function object that will be used as the objective function.
  
  Returns:
      (Tuple[Lion, Lion]): A pair of offsprings that resulted from mating.
code: def _mating_operator(
      self, agent: List[Lion], males: List[Lion], function: Function
  ) -> Tuple[Lion, Lion]:
      """Wraps the mating operator.
  
      Args:
          agent: Current agent.
          males: List of males that will be breed.
          function: A Function object that will be used as the objective function.
  
      Returns:
          (Tuple[Lion, Lion]): A pair of offsprings that resulted from mating.
  
      """
  
      males_average = np.mean([male.position for male in males], axis=0)
      beta = r.generate_gaussian_random_number(0.5, 0.1)
  
      a1, a2 = copy.deepcopy(agent), copy.deepcopy(agent)
  
      # Updates first offspring position (eq. 13)
      a1.position = beta * a1.position + (1 - beta) * males_average
  
      # Updates second offspring position (eq. 14)
      a2.position = (1 - beta) * a2.position + beta * males_average
  
      for j in range(agent.n_variables):
          r2 = r.generate_uniform_random_number()
          if r2 < self.Mu:
              a1.position[j] = r.generate_uniform_random_number(
                  a1.lb[j], a1.ub[j]
              )
  
          r3 = r.generate_uniform_random_number()
          if r3 < self.Mu:
              a2.position[j] = r.generate_uniform_random_number(
                  a2.lb[j], a2.ub[j]
              )
  
      a1.clip_by_bound()
      a2.clip_by_bound()
  
      a1.best_position = copy.deepcopy(a1.position)
      a1.female = bool(beta >= 0.5)
      a1.fit = function(a1.position)
  
      a2.best_position = copy.deepcopy(a2.position)
      a2.female = bool(beta >= 0.5)
      a2.fit = function(a2.position)
  
      return a1, a2
  
imports: import copy
  import itertools
  from typing import Any, Dict, List, Optional, Tuple, Union
  import numpy
  import opytimizer.math.distribution
  import opytimizer.math.general
  import opytimizer.math.random
  import opytimizer.utils.constant
  import opytimizer.utils.exception
  from opytimizer.core import Agent, Optimizer
  from opytimizer.core.function import Function
  from opytimizer.core.space import Space
  from opytimizer.utils import logging
label_desc: Use image node_id 22 for calling the LOA obj's underlying member method code with example usage: obj._mating_operator(agent, males, function) and returns: a1,  a2