libsemigroups  v3.3.0
C++ library for semigroups and monoids
Loading...
Searching...
No Matches
make<Transf>

This page contains documentation related to safely constructing a Transf instance.

See also
The `make` function for an overview of possible uses of the make function.

Functions

template<typename Return, typename OtherContainer>
std::enable_if_t< IsTransf< Return >, Return > make (OtherContainer &&cont)
 Construct a Transf from universal reference container and check.
 
template<typename Return, typename OtherScalar>
std::enable_if_t< IsTransf< Return >, Return > make (std::initializer_list< OtherScalar > cont)
 Construct a Transf from initializer list and check.
 

Function Documentation

◆ make() [1/2]

template<typename Return, typename OtherContainer>
std::enable_if_t< IsTransf< Return >, Return > make ( OtherContainer && cont)
nodiscard

Constructs a Transf initialized using the container cont as follows: the image of the point i under the transformation is the value in position i of the container cont.

Template Parameters
Returnthe return type. Must satisfy IsTransf<Return>.
OtherContaineruniversal reference for the type of the container.
Parameters
contthe container.
Returns
A Transf instance with degree N.
Exceptions
LibsemigroupsExceptionif any of the following hold:
  • the size of cont is incompatible with container_type.
  • any value in cont exceeds cont.size().
Complexity
Linear in the size of the container cont.

◆ make() [2/2]

template<typename Return, typename OtherScalar>
std::enable_if_t< IsTransf< Return >, Return > make ( std::initializer_list< OtherScalar > cont)
nodiscard

Constructs a Transf initialized using the initializer list cont as follows: the image of the point i under the transformation is the value in position i of the container cont.

Template Parameters
Returnthe return type. Must satisfy IsTransf<Return>.
OtherContaineruniversal reference for the type of the container.
Parameters
contthe container.
Returns
A Transf instance with degree N.
Exceptions
LibsemigroupsExceptionif 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.
  • the value UNDEFINED belongs to cont.
Complexity
Linear in the size of the container cont.