This page contains documentation related to safely constructing a Perm instance.
- See also
- The `make` function for an overview of possible uses of the
make function.
|
| template<typename Return, typename Container> |
| enable_if_is_same< Return, HPCombi::Perm16 > | make (Container &&cont) |
| | Construct a HPCombi::Perm16 from universal reference and check.
|
| |
| template<typename Return, typename OtherContainer> |
| std::enable_if_t< IsPerm< Return >, Return > | make (OtherContainer &&cont) |
| | Construct from universal reference container and check.
|
| |
| template<typename Return> |
| std::enable_if_t< IsPerm< Return >, Return > | make (std::initializer_list< typename Return::point_type > cont) |
| | Construct from universal reference container and check.
|
| |
◆ make() [1/3]
template<typename Return, typename Container>
Constructs a HPCombi::Perm16 initialized using the container cont as follows: the image of the point i under the permutation is the value in position i of the container cont.
- Template Parameters
-
| Return | the return type. Must by HPCombi::Perm16. |
| Container | type of the container. |
- Parameters
-
- Returns
- A
HPCombi::Perm16 instance.
- Exceptions
-
| LibsemigroupsException | if any of the following hold:
- the size of
cont exceeds 16;
- any value in
cont exceeds cont.size().
|
- Complexity
- Linear in the size of the container
cont.
◆ make() [2/3]
template<typename Return, typename OtherContainer>
| std::enable_if_t< IsPerm< Return >, Return > make |
( |
OtherContainer && | cont | ) |
|
|
nodiscard |
Constructs a Perm initialized using the container cont as follows: the image of the point i under the permutation is the value in position i of the container cont.
- Template Parameters
-
| Return | the return type. Must satisfy IsPerm<Return>. |
| OtherContainer | universal reference for the type of the container. |
- Parameters
-
- Returns
- A Perm instance with degree
N.
- Exceptions
-
| LibsemigroupsException | if any of the following hold:
- the size of
cont is incompatible with container_type.
- any value in
cont exceeds cont.size() and is not equal to UNDEFINED.
- there are repeated values in
cont.
|
- Complexity
- Linear in the size of the container
cont.
◆ make() [3/3]
template<typename Return>
Constructs a Perm initialized using the container cont as follows: the image of the point i under the permutation is the value in position i of the container cont.
- Template Parameters
-
- Parameters
-
- Returns
- A Perm instance with degree
N.
- Exceptions
-
| LibsemigroupsException | if any of the following hold:
- the size of
cont is incompatible with container_type.
- any value in
cont exceeds cont.size() and is not equal to UNDEFINED.
- there are repeated values in
cont.
|
- Complexity
- Linear in the size of the container
cont.