3.5.7. traits.hpp

Full path: permutation/traits.hpp

template<typename Perm>
class permutation_traits
using value_type = typename Perm::value_type

The whole specialization of this traits class only exists if this type exists.

static value_type get(const Perm &p, value_type i)
Returns

the image of i under p using p.get_(i).

static Perm make(std::size_t n)
Returns

a new permutation of size n using Perm(n).

static Perm make_identity(std::size_t n)
Returns

a permutation created with make and initialized as the identity.

static void put(Perm &p, value_type i, value_type image)

Sets the image of i to image using p.put_(i, image).

static std::size_t degree(const Perm &p)
Returns

p.degree_()

static Perm make_inverse(const Perm &p, std::size_t n)
Returns

a permutation created with make where the inverse of p has been copied into.