From: Michael Andreen Date: Sun, 24 Jun 2007 14:35:21 +0000 (+0000) Subject: minor change X-Git-Tag: v0.1~46 X-Git-Url: https://ruin.nu/git/?p=germs.git;a=commitdiff_plain;h=e81855989d0f0e124e0ec770b417bcb099959391 minor change --- diff --git a/src/genesorter.cpp b/src/genesorter.cpp index 8643702..8126d6a 100644 --- a/src/genesorter.cpp +++ b/src/genesorter.cpp @@ -32,13 +32,13 @@ using namespace std; GeneSorter::ActionList GeneSorter::sort(const GeneOrder& go){ ActionList al; GeneOrder temp(go); - while(countCycles(temp) != temp.size() - 1){ + while(inversionDistance(go) > 0){ ActionList safe = safeActions(go); if (safe.size() > 0){ safe[0](temp); al.push_back(safe[0]); }else - return ActionList(); //TODO: Need to handle other cases here. + return ActionList(); //TODO: Need to handle hurdles. } return al; }