Skip to content

Commit

Permalink
update doc comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ericf123 committed Oct 18, 2019
1 parent 87449b6 commit 8b9b4f2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions deap/tools/emo.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,16 +146,18 @@ def selTournamentDCD(individuals, k):
"""Tournament selection based on dominance (D) between two individuals, if
the two individuals do not interdominate the selection is made
based on crowding distance (CD). The *individuals* sequence length has to
be a multiple of 4. Starting from the beginning of the selected
individuals, two consecutive individuals will be different (assuming all
individuals in the input list are unique). Each individual from the input
list won't be selected more than twice.
be a multiple of 4 only if k is equal to the length of individuals.
Starting from the beginning of the selected individuals, two consecutive
individuals will be different (assuming all individuals in the input list
are unique). Each individual from the input list won't be selected more
than twice.
This selection requires the individuals to have a :attr:`crowding_dist`
attribute, which can be set by the :func:`assignCrowdingDist` function.
:param individuals: A list of individuals to select from.
:param k: The number of individuals to select.
:param k: The number of individuals to select. Must be less than or equal
to len(individuals).
:returns: A list of selected individuals.
"""

Expand Down

0 comments on commit 8b9b4f2

Please sign in to comment.