]> ruin.nu Git - germs.git/commitdiff
minor change
authorMichael Andreen <harv@ruin.nu>
Sun, 24 Jun 2007 14:35:21 +0000 (14:35 +0000)
committerMichael Andreen <harv@ruin.nu>
Sun, 24 Jun 2007 14:35:21 +0000 (14:35 +0000)
src/genesorter.cpp

index 8643702250f82ac6b90bbfd08f6b65aaf0e85ee2..8126d6aaa5781336ab03ba3a822f4d72f4c8820d 100644 (file)
@@ -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;
 }