]> ruin.nu Git - germs.git/commitdiff
don't print as much
authorMichael Andreen <harv@ruin.nu>
Sat, 30 Jun 2007 11:14:38 +0000 (11:14 +0000)
committerMichael Andreen <harv@ruin.nu>
Sat, 30 Jun 2007 11:14:38 +0000 (11:14 +0000)
src/genesorter.cpp

index 755368812614cae8063633d31b30971674e3fbf5..3ce89ad493d6163ee568a0f4e3697a1face13946 100644 (file)
@@ -35,13 +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<int>(cout, " "));
-               cout << endl;
+               //cout << "Distance: " << inversionDistance(temp) << " : ";
+               //copy(temp.begin(), temp.end(), ostream_iterator<int>(cout, " "));
+               //cout << endl;
                ActionList safe = safeActions(temp);
                if (safe.size() > 0){
                        safe[0](temp);
-                       cout << "Action: " << safe[0].toString() << " ";
+                       cout << "Action: " << safe[0].toString() << endl;
                        al.push_back(safe[0]);
                }else
                        return ActionList(); //TODO: Need to handle hurdles.
@@ -69,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<size_t,SortAction>(score,sa));
                }                               
        }