![]() |
libsemigroups
v3.0.0
C++ library for semigroups and monoids
|
Defined in matrix.hpp
.
This page describes the functionality for \(m \times n\) matrices of integers for arbitrary dimensions \(m\) and \(n\). There are two types of such matrices: those whose dimension is known at compile-time, and those where it is not. Both types can be accessed via the alias template IntMat: if R
or C
has value 0
, then the dimensions can be set at run time, otherwise R
and C
are the dimension. The default value of R
is 0
, and of C
is R
.
The alias IntMat is either StaticMatrix, DynamicMatrix (compile-time arithmetic), or DynamicMatrix (run-time arithmetic), please refer to the documentation of these class templates for more details. The only substantial difference in the interface of static and dynamic is that the former can be default constructed and the latter should be constructed using the dimensions.
Classes | |
struct | IntegerOne< Scalar > |
Function object for returning the multiplicative identity. More... | |
struct | IntegerPlus< Scalar > |
Function object for addition in the ring of integers. More... | |
struct | IntegerProd< Scalar > |
Function object for multiplication in the ring of integers. More... | |
struct | IntegerZero< Scalar > |
Function object for returning the additive identity. More... | |
Typedefs | |
template<typename Scalar> | |
using | DynamicIntMat |
Alias for dynamic integer matrices. | |
template<size_t R = 0, size_t C = R, typename Scalar = int> | |
using | IntMat |
Alias template for integer matrices. | |
template<size_t R, size_t C, typename Scalar> | |
using | StaticIntMat |
Alias for static integer matrices. | |
Functions | |
template<typename Mat> | |
std::enable_if_t< IsIntMat< Mat > > | throw_if_bad_entry (Mat const &, typename Mat::scalar_type val) |
Check that an entry in an integer matrix is valid. | |
template<typename Mat> | |
std::enable_if_t< IsIntMat< Mat > > | throw_if_bad_entry (Mat const &x) |
Check that an integer matrix is valid. | |
using DynamicIntMat |
Defined in matrix.hpp
.
Alias for the type of dynamic integer matrices where the dimensions of the matrices can be defined at run time.
Scalar | the type of the entries in the matrix (default: int ). |
using IntMat |
Defined in matrix.hpp
.
Alias template for integer matrices.
R | the number of rows of the matrix. A value of 0 (the default value) indicates that the dimensions will be set at run time. |
C | the number of columns of the matrix. A value of 0 indicates that the dimensions will be set at run time (the default value is R ). |
Scalar | the type of the entries in the matrix (default: int ). |
using StaticIntMat |
Defined in matrix.hpp
.
Alias for the type of static integer matrices where the dimensions of the matrices can be defined at compile time.
R | the number of rows of the matrix. A value of 0 (the default value) indicates that the dimensions will be set at run time. |
C | the number of columns of the matrix. A value of 0 indicates that the dimensions will be set at run time (the default value is R ). |
Scalar | the type of the entries in the matrix (default: int ). |
std::enable_if_t< IsIntMat< Mat > > throw_if_bad_entry | ( | Mat const & | , |
typename Mat::scalar_type | val ) |
Defined in matrix.hpp
.
This function throws an exception if the entry val
of an integer matrix are not valid, which is if and only if the entry val
equals POSITIVE_INFINITY or NEGATIVE_INFINITY.
The 1st argument is used for overload resolution.
Mat | the type of the 1st argument, must satisfy IsMatrix<Mat>. |
val | the entry to check. |
std::enable_if_t< IsIntMat< Mat > > throw_if_bad_entry | ( | Mat const & | x | ) |
Defined in matrix.hpp
.
This function throws an exception if the entries of an integer matrix are not valid, which is if and only if any of the entries equal POSITIVE_INFINITY or NEGATIVE_INFINITY.
Mat | the type of the argument x , must satisfy IsMatrix<Mat>. |
x | the matrix to check. |