X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=src%2Freverseaction.h;h=006c9eb4de9df4446b27ccaee6da4068d435a4a2;hb=90e2c43b99205b0d7a300209011231cd8d11f7a0;hp=76ab6660da377187420f268ce6dda84825ef3361;hpb=7e811915a713eeef44f03385a1fc1f74a5301c30;p=germs.git diff --git a/src/reverseaction.h b/src/reverseaction.h index 76ab666..006c9eb 100644 --- a/src/reverseaction.h +++ b/src/reverseaction.h @@ -25,6 +25,7 @@ #include "genealgorithms.h" #include +#include /** * Reverses an interval @@ -59,6 +60,15 @@ class ReverseAction : public SortAction{ } return false; } + + /** + * Gives a string representation of the action, for output + */ + virtual std::string toString() const{ + std::ostringstream os; + os << "[" << _i << "," << _j << "]"; + return os.str(); + } private: size_t _i; size_t _j;