X-Git-Url: https://ruin.nu/git/?p=germs.git;a=blobdiff_plain;f=src%2Freverseaction.h;h=006c9eb4de9df4446b27ccaee6da4068d435a4a2;hp=76ab6660da377187420f268ce6dda84825ef3361;hb=6ed5c4682ee599c7d03d8c67dcca3ac4033a63ec;hpb=5f37e9f08f736f4fe4576dd530c60ecb87017907 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;