Static member functions¶
-
inline Perm libsemigroups::Perm::identity() const¶
Returns the identity permutation on degree() points.
This function returns a newly constructed permutation with degree equal to the degree of
this
that fixes every value from0
to degree().- Parameters
(None)
- Throws
(None) – This function guarantees not to throw a LibsemigroupsException.
- Returns
A value of type
PPerm
.
-
static inline Perm libsemigroups::Perm::identity(size_t M)¶
Returns the identity permutation on the given number of points.
This function returns a newly constructed permutation with degree equal to
M
that fixes every value from0
toM
.- Complexity
Linear in
M
.
- Parameters
M – the degree.
- Throws
(None) – This function guarantees not to throw a LibsemigroupsException.
- Returns
A value of type
PPerm
.
-
template<typename T>
static inline Perm libsemigroups::Perm::make(T &&cont)¶ Construct from image list and validate.
Constructs a permutation \(f\) of degree
M
such that \(f(i) = cont[i]\) for every value in the range \([0, M)\) where \(M\) iscont.size()
- Complexity
Linear in the size of
cont
.
- Parameters
cont – list of images
- Throws
LibsemigroupsException – if any of the following fail to hold:
the size of
cont
is incompatible with container_type.any value in
cont
exceedscont.size()
there are repeated values in
cont
.
-
static inline Transf libsemigroups::Perm::make(std::initializer_list<value_type> &&cont)¶
Construct from a container and validate.
See also