Permutation

Functions

bool operator==(const Permutation&, const Permutation&)
Permutation operator*(const Permutation &a, const Permutation &b)

Composition.

class Permutation

Public Functions

Permutation(const std::vector<int> &perm)

Permutation.

Permutation(const int n)

Identity.

Permutation(const int n, const int a, const int b)

(a b) transposition of size n

inline int size() const
inline int operator()(const int v) const
Permutation inverse() const
std::vector<int> orbit(const int n) const
std::vector<std::vector<int>> orbits() const
int signature() const
std::vector<Permutation> transpositionsDecomposition() const

Decomposition into composition of transpositions.

Private Members

int m_size
bool m_isTransposition
std::vector<int> m_perm