From e81855989d0f0e124e0ec770b417bcb099959391 Mon Sep 17 00:00:00 2001 From: Michael Andreen Date: Sun, 24 Jun 2007 14:35:21 +0000 Subject: [PATCH] minor change --- src/genesorter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.39.2