libsemigroups  v3.0.0
C++ library for semigroups and monoids
Loading...
Searching...
No Matches
StaticPTransf< N, Scalar >
template<size_t N, typename Scalar>
class libsemigroups::StaticPTransf< N, Scalar >

Defined in transf.hpp.

Static partial transformations.

This is a class for partial transformations where the number of points acted on (the degree) is set at compile time.

Template Parameters
Scalaran unsigned integer type.
Inheritance diagram for StaticPTransf< N, Scalar >:
[legend]

Public Types

using container_type = std::array<Scalar, N>
 Type of the underlying container.
 
using point_type = Scalar
 Type of the image values.
 
- Public Types inherited from PTransfBase< Scalar, std::array< Scalar, N > >
using const_iterator
 Type of const iterators point to image values.
 
using container_type
 Type of the underlying container.
 
using iterator
 Type of iterators point to image values.
 
using point_type
 Type of the image values.
 

Public Member Functions

 StaticPTransf ()
 Default constructor.
 
 StaticPTransf (size_t n)
 Construct with given degree.
 
const_iterator begin () const noexcept
 Returns a const_iterator (random access iterator) pointing at the first image value.
 
iterator begin () noexcept
 Returns an iterator (random access iterator) pointing at the first image value.
 
const_iterator end () const noexcept
 Returns a const_iterator (random access iterator) pointing one past the last image value.
 
iterator end () noexcept
 Returns an iterator (random access iterator) pointing one past the last image value.
 
StaticPTransfincrease_degree_by (size_t)
 Increase the degree in-place.
 
- Public Member Functions inherited from PTransfBase< Scalar, std::array< Scalar, N > >
 PTransfBase ()=default
 Default constructor.
 
 PTransfBase ()=default
 Default constructor.
 
 PTransfBase (Iterator first, Iterator last)
 Construct from a range of images.
 
 PTransfBase (Iterator first, Iterator last)
 Construct from a range of images.
 
 PTransfBase (PTransfBase &&)=default
 Default move constructor.
 
 PTransfBase (PTransfBase &&)=default
 Default move constructor.
 
 PTransfBase (PTransfBase const &)=default
 Default copy constructor.
 
 PTransfBase (PTransfBase const &)=default
 Default copy constructor.
 
 PTransfBase (std::array< Scalar, N > &&cont)
 Construct from a container of images.
 
 PTransfBase (std::array< Scalar, N > &&cont)
 Construct from a container of images.
 
 PTransfBase (std::array< Scalar, N > const &cont)
 Construct from a container of images.
 
 PTransfBase (std::array< Scalar, N > const &cont)
 Construct from a container of images.
 
 PTransfBase (std::initializer_list< Scalar > cont)
 Construct from a container of images.
 
 PTransfBase (std::initializer_list< Scalar > cont)
 Construct from a container of images.
 
point_typeat (size_t i)
 Get a reference to the image of a point.
 
point_typeat (size_t i)
 Get a reference to the image of a point.
 
point_type const & at (size_t i) const
 Get a const reference to the image of a point.
 
point_type const & at (size_t i) const
 Get a const reference to the image of a point.
 
const_iterator begin () const noexcept
 Returns a const_iterator (random access iterator) pointing at the first image value.
 
const_iterator begin () const noexcept
 Returns a const_iterator (random access iterator) pointing at the first image value.
 
iterator begin () noexcept
 Returns an iterator (random access iterator) pointing at the first image value.
 
iterator begin () noexcept
 Returns an iterator (random access iterator) pointing at the first image value.
 
const_iterator cbegin () const noexcept
 Returns a const_iterator (random access iterator) pointing at the first image value.
 
const_iterator cbegin () const noexcept
 Returns a const_iterator (random access iterator) pointing at the first image value.
 
const_iterator cend () const noexcept
 Returns a const_iterator (random access iterator) pointing one past the last image value.
 
const_iterator cend () const noexcept
 Returns a const_iterator (random access iterator) pointing one past the last image value.
 
size_t degree () const noexcept
 Returns the degree of a partial transformation.
 
size_t degree () const noexcept
 Returns the degree of a partial transformation.
 
const_iterator end () const noexcept
 Returns a const_iterator (random access iterator) pointing one past the last image value.
 
const_iterator end () const noexcept
 Returns a const_iterator (random access iterator) pointing one past the last image value.
 
iterator end () noexcept
 Returns an iterator (random access iterator) pointing one past the last image value.
 
iterator end () noexcept
 Returns an iterator (random access iterator) pointing one past the last image value.
 
size_t hash_value () const
 Returns a hash value.
 
size_t hash_value () const
 Returns a hash value.
 
bool operator!= (PTransfBase const &that) const
 Compare for inequality.
 
bool operator!= (PTransfBase const &that) const
 Compare for inequality.
 
Subclass operator* (Subclass const &that) const
 Multiply by another partial transformation.
 
Subclass operator* (Subclass const &that) const
 Multiply by another partial transformation.
 
bool operator< (PTransfBase const &that) const
 Compare for less.
 
bool operator< (PTransfBase const &that) const
 Compare for less.
 
bool operator<= (PTransfBase const &that) const
 Compare for less than or equal.
 
bool operator<= (PTransfBase const &that) const
 Compare for less than or equal.
 
PTransfBaseoperator= (PTransfBase &&)=default
 Default move assignment operator.
 
PTransfBaseoperator= (PTransfBase &&)=default
 Default move assignment operator.
 
PTransfBaseoperator= (PTransfBase const &)=default
 Default copy assignment operator.
 
PTransfBaseoperator= (PTransfBase const &)=default
 Default copy assignment operator.
 
bool operator== (PTransfBase const &that) const
 Compare for equality.
 
bool operator== (PTransfBase const &that) const
 Compare for equality.
 
bool operator> (PTransfBase const &that) const
 Compare for greater.
 
bool operator> (PTransfBase const &that) const
 Compare for greater.
 
bool operator>= (PTransfBase const &that) const
 Compare for greater than or equal.
 
bool operator>= (PTransfBase const &that) const
 Compare for greater than or equal.
 
point_typeoperator[] (size_t i)
 Get a reference to the image of a point.
 
point_typeoperator[] (size_t i)
 Get a reference to the image of a point.
 
point_type const & operator[] (size_t i) const
 Get a const reference to the image of a point.
 
point_type const & operator[] (size_t i) const
 Get a const reference to the image of a point.
 
size_t rank () const
 Returns the number of distinct image values.
 
size_t rank () const
 Returns the number of distinct image values.
 
void swap (PTransfBase &that) noexcept
 Swap with another partial transformation.
 
void swap (PTransfBase &that) noexcept
 Swap with another partial transformation.
 

Additional Inherited Members

- Static Public Member Functions inherited from PTransfBase< Scalar, std::array< Scalar, N > >
static Subclass make (OtherContainer &&cont)
 Construct from universal reference container and check.
 
static Subclass make (OtherContainer &&cont)
 Construct from universal reference container and check.
 
static Subclass make (std::initializer_list< OtherScalar > cont)
 Construct from std::initializer_list and check.
 
static Subclass make (std::initializer_list< OtherScalar > cont)
 Construct from std::initializer_list and check.
 
static Subclass one (size_t N)
 Returns the identity transformation on the given number of points.
 
static Subclass one (size_t N)
 Returns the identity transformation on the given number of points.
 
static point_type undef () noexcept
 Returns the value used to represent "undefined".
 
static point_type undef () noexcept
 Returns the value used to represent "undefined".
 

Member Typedef Documentation

◆ container_type

template<size_t N, typename Scalar>
using container_type = std::array<Scalar, N>

In this case, this is std::array<point_type, N>.

◆ point_type

template<size_t N, typename Scalar>
using point_type = Scalar

Also the template parameter Scalar.

Constructor & Destructor Documentation

◆ StaticPTransf() [1/2]

template<size_t N, typename Scalar>
StaticPTransf ( )
inline

Constructs a partial transformation of degree equal to the template parameter N with the image of every point set to UNDEFINED.

Exceptions
This function guarantees not to throw a LibsemigroupsException.
Complexity
Linear in the template parameter N.

◆ StaticPTransf() [2/2]

template<size_t N, typename Scalar>
StaticPTransf ( size_t n)
explicit

This function constructs the same partial transformation as the default constructor, and exists only for consistency of interface with DynamicPTransf.

Parameters
nthe degree of the partial transformation being constructed.
Exceptions
LibsemigroupsExceptionif n is not equal to the class template parameter N.

Member Function Documentation

◆ begin() [1/2]

template<size_t N, typename Scalar>
const_iterator begin ( ) const
inlinenodiscardnoexcept
Returns
A const iterator to the first image value.
Exceptions
This function is noexcept and is guaranteed never to throw.
Complexity
Constant.

◆ begin() [2/2]

template<size_t N, typename Scalar>
iterator begin ( )
inlinenodiscardnoexcept
Returns
An iterator to the first image value.
Exceptions
This function is noexcept and is guaranteed never to throw.
Complexity
Constant.

◆ end() [1/2]

template<size_t N, typename Scalar>
const_iterator end ( ) const
inlinenodiscardnoexcept
Returns
A const iterator pointing one past the last image value.
Exceptions
This function is noexcept and is guaranteed never to throw.
Complexity
Constant.

◆ end() [2/2]

template<size_t N, typename Scalar>
iterator end ( )
inlinenodiscardnoexcept
Returns
An iterator pointing one past the last image value.
Exceptions
This function is noexcept and is guaranteed never to throw.
Complexity
Constant.

◆ increase_degree_by()

template<size_t N, typename Scalar>
StaticPTransf & increase_degree_by ( size_t )
inline

This doesn't make sense for this type, and it throws every time.

Exceptions
LibsemigroupsExceptionevery time.

The documentation for this class was generated from the following file: