Skip to content

Commit

Permalink
keep the gene bounds after a run
Browse files Browse the repository at this point in the history
  • Loading branch information
KRM7 committed Aug 10, 2023
1 parent 7263efe commit 7c6549e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/ga_base.impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ namespace gapp
GAPP_ASSERT(fitness_function, "The fitness function can't be a nullptr.");
GAPP_ASSERT(bounds.size() == fitness_function->chrom_len(), "The length of the bounds vector must match the chromosome length.");

detail::RestoreOnExit scope_exit{ max_gen_, std::move(bounds_) };
detail::RestoreOnExit scope_exit{ max_gen_ };

fitness_function_ = std::move(fitness_function);
max_gen(generations);
Expand Down

0 comments on commit 7c6549e

Please sign in to comment.