Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Permutation API
typedef unsigned int Uint;
class Permutation {
public:
//construct identity of given order
explicit Permutation(Uint order);
//construct from init list
Permutation(std::initializer_list<Uint> list);
//construct from given range of Uint
template<class InputIt>
Permutation(InputIt first, InputIt last);
Uint order() const;
bool operator==(const Permutation& that) const;
Uint operator[](Uint index) const;
Permutation operator*(const Permutation& that) const;
//permute given range
template<class It>
void operator()(It first, It last) const;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.