Skip to content

Commit

Permalink
undo nsga2_test changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jonpsy committed Mar 12, 2021
1 parent 41a5a90 commit 0b54a17
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tests/nsga2_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,12 @@ TEST_CASE("NSGA2SchafferN1Test", "[NSGA2Test]")
std::vector<arma::mat> bestFront = opt.Front();

bool allInRange = true;
double minimumPositive = 1000;

for (arma::mat solution: bestFront)
{
double val = arma::as_scalar(solution);
if(val >= 0.0)
minimumPositive = std::min(minimumPositive, val);

if ((val < 0.0 && std::abs(val) >= minimumPositive) || val > 2.0)
if (val < 0.0 || val > 2.0)
{
allInRange = false;
break;
Expand Down

0 comments on commit 0b54a17

Please sign in to comment.