#include "sortaction.h"
#include "reverseaction.h"
+#include "genealgorithms.h"
+
using namespace std;
-GeneSorter::ActionList GeneSorter::sort(const GeneOrder& go1){
+GeneSorter::ActionList GeneSorter::sort(const GeneOrder& go){
return ActionList();
}
-GeneSorter::ActionList GeneSorter::safeActions(const GeneOrder& go1){
- return ActionList();
+GeneSorter::ActionList GeneSorter::safeActions(const GeneOrder& go){
+ if (countCycles(go) == go.size() - 1)
+ return ActionList();
+ ActionList al;
+ al.push_back(ActionPointer(new ReverseAction(2,3)));
+ return al;
}