Skip to content

Commit

Permalink
corner cases
Browse files Browse the repository at this point in the history
  • Loading branch information
darioizzo committed May 26, 2020
1 parent 855400a commit 8692f50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/genetic_operators.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ std::pair<vector_double, vector_double> sbx_crossover_impl(const vector_double &
}
}

// This implements two-points binary crossover and applies it to the integer part of the chromosome.
if (nix > 1) {
// This implements two-points crossover and applies it to the integer part of the chromosome.
if (nix > 0u) {
std::uniform_int_distribution<vector_double::size_type> ra_num(ncx, nx - 1u);
site1 = ra_num(random_engine);
site2 = ra_num(random_engine);
Expand Down

0 comments on commit 8692f50

Please sign in to comment.