![]() |
libsemigroups
v3.0.0
C++ library for semigroups and monoids
|
Defined in transf.hpp
.
A transformation \(f\) is just a function defined on the whole of \(\{0, 1, \ldots, n - 1\}\) for some integer \(n\) called the degree of \(f\). A transformation is stored as a container of the images of \(\{0, 1, \ldots, n - 1\}\), i.e. \(((0)f, (1)f, \ldots, (n - 1)f)\).
If N
is 0
(the default), then the degree of a Transf instance can be defined at runtime, and if N
is not 0
, then the degree is fixed at compile time.
If N
is 0
, then the default value of Scalar
is uint32_t
. If N
is not 0
, then the default value of Scalar
is the smallest integer type able to hold N
. See also SmallestInteger.
N | the degree (default: 0 ). |
Scalar | an unsigned integer type (the type of the image values). |
This class inherits from either StaticPTransf or DynamicPTransf, see the documentation of these classes for more details of the available member functions.
Public Types | |
using | container_type = typename base_type::container_type |
Type of the underlying container. | |
using | point_type = Scalar |
Type of the image values. | |
Public Member Functions | |
void | product_inplace (Transf const &f, Transf const &g) |
Multiply two transformations and store the product in this . | |
Static Public Member Functions | |
static Transf | one (size_t M) |
Returns the identity transformation on the given number of points. | |
using container_type = typename base_type::container_type |
In this case, this is PTransf<N, Scalar>::container_type.
using point_type = Scalar |
Also the template parameter Scalar
.
|
inlinestaticnodiscard |
This function returns a newly constructed transformation with degree equal to M
that fixes every value from 0
to M
.
M | the degree. |
Transf
.LibsemigroupsException | if IsStatic<Transf> is true, and M is not the same as the template parameter N . |
void product_inplace | ( | Transf< N, Scalar > const & | f, |
Transf< N, Scalar > const & | g ) |
Replaces the contents of this
by the product of f
and g
.
f | a transformation. |
g | a transformation. |
f
and g
have different degrees, then bad things will happen.