:py:mod:`desdeo_emo.selection.TournamentSelection`
==================================================

.. py:module:: desdeo_emo.selection.TournamentSelection


Module Contents
---------------

Classes
~~~~~~~

.. autoapisummary::

   desdeo_emo.selection.TournamentSelection.TournamentSelection




.. py:class:: TournamentSelection(pop, tournament_size)

   Bases: :py:obj:`desdeo_emo.selection.SelectionBase.SelectionBase`

   Tournament selection operator.

   :param pop: The population of individuals
   :type pop: Population
   :param tournament_size: Size of the tournament.
   :type tournament_size: int

   .. py:method:: do(pop, fitness) -> List[int]

      Performs tournament selections and returns the parents.
      :param pop: The current population.
      :type pop: Population

      :returns: List of indices of the selected individuals
      :rtype: List[int]


   .. py:method:: _tour_select()

      Tournament selection. Choose number of individuals to participate
      and select the one with the best fitness.

      :param fitness: An array of each individual's fitness.
      :type fitness: array_like
      :param tournament_size: Number of participants in the tournament.
      :type tournament_size: int

      :returns: The index of the best individual.
      :rtype: int



