X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=src%2Fgenesorter.cpp;h=3ce89ad493d6163ee568a0f4e3697a1face13946;hb=90e2c43b99205b0d7a300209011231cd8d11f7a0;hp=d73f176eb01465b2b717283b59015167f921cc7a;hpb=79451fe868d3d11c0294383a2ddab95b40a0a4ce;p=germs.git diff --git a/src/genesorter.cpp b/src/genesorter.cpp index d73f176..3ce89ad 100644 --- a/src/genesorter.cpp +++ b/src/genesorter.cpp @@ -35,12 +35,13 @@ GeneSorter::ActionList GeneSorter::sort(const GeneOrder& go){ ActionList al; GeneOrder temp(go); while(inversionDistance(temp) > 0){ - cout << "Distance: " << inversionDistance(temp) << " : "; - copy(temp.begin(), temp.end(), ostream_iterator(cout, " ")); - cout << endl; + //cout << "Distance: " << inversionDistance(temp) << " : "; + //copy(temp.begin(), temp.end(), ostream_iterator(cout, " ")); + //cout << endl; ActionList safe = safeActions(temp); if (safe.size() > 0){ safe[0](temp); + cout << "Action: " << safe[0].toString() << endl; al.push_back(safe[0]); }else return ActionList(); //TODO: Need to handle hurdles. @@ -68,7 +69,7 @@ GeneSorter::ActionList GeneSorter::safeActions(const GeneOrder& go){ if (intervals[i].oriented && intervals[i].first != intervals[i].second){ SortAction sa(new ReverseAction(intervals[i])); size_t score = scoreAction(go,sa); - cout << "Inversion: " << min(intervals[i].first,intervals[i].second) << ":" << max(intervals[i].first,intervals[i].second)-1 << " Score: " << score << endl; + //cout << "Inversion: " << min(intervals[i].first,intervals[i].second) << ":" << max(intervals[i].first,intervals[i].second)-1 << " Score: " << score << endl; pq.push(pair(score,sa)); } }