![]() |
libsemigroups
v3.0.0
C++ library for semigroups and monoids
|
Defined in matrix.hpp
.
This page describes the functionality for \(n \times n\) projective matrices over the max-plus semiring. Projective max-plus matrices belong to the quotient of the monoid of all max-plus matrices by the congruence where two matrices are related if they differ by a scalar multiple; see MaxPlusMat.
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 ProjMaxPlusMat : if R
or C
has value 0
, then the dimensions can be set at run time, otherwise R
and C
are the dimensions. The default value of R
is 0
, C
is R
, and Scalar
is int
.
Matrices in both these classes are modified when constructed to be in a normal form which is obtained by subtracting the maximum finite entry in the matrix from the every finite entry.
A ProjMaxPlusMat is neither a StaticMatrix
nor a DynamicMatrix
, but has the same interface as each of these types. Every instance of ProjMaxPlusMat wraps a MaxPlusMat.
Please refer to the documentation of these class templates for more details. The only substantial difference in the interface of static and dynamic matrices is that the former can be default constructed and the latter should be constructed using the dimensions.
Typedefs | |
template<typename Scalar> | |
using | DynamicProjMaxPlusMat = detail::ProjMaxPlusMat<DynamicMaxPlusMat<Scalar>> |
Alias for dynamic projective max-plus matrices with run-time dimensions. | |
template<size_t R = 0, size_t C = R, typename Scalar = int> | |
using | ProjMaxPlusMat |
Alias template for projective max-plus matrices. | |
template<size_t R, size_t C, typename Scalar> | |
using | StaticProjMaxPlusMat = detail::ProjMaxPlusMat<StaticMaxPlusMat<R, C, Scalar>> |
Alias for static projective max-plus matrices with compile-time arithmetic and dimensions. | |
Variables | |
template<typename T> | |
static constexpr bool | IsProjMaxPlusMat = detail::IsProjMaxPlusMatHelper<T>::value |
Helper to check if a type is ProjMaxPlusMat. | |
using DynamicProjMaxPlusMat = detail::ProjMaxPlusMat<DynamicMaxPlusMat<Scalar>> |
Defined in matrix.hpp
.
Alias for the type of dynamic projective max-plus matrices where the dimensions of the matrices can be defined at run time.
Scalar | the type of the entries in the matrix. |
using ProjMaxPlusMat |
Defined in matrix.hpp
.
Alias template for projective max-plus matrices.
R | the number of rows. A value of 0 indicates that the value will be set at run time (default: 0 ). |
C | the number of columns. A value of 0 indicates that the value will be set at run time (default: R ). |
Scalar | The type of the entries in the matrix (default: int ). |
using StaticProjMaxPlusMat = detail::ProjMaxPlusMat<StaticMaxPlusMat<R, C, Scalar>> |
Defined in matrix.hpp
.
Alias for static projective max-plus matrices whose arithmetic and dimensions are defined at compile-time.
R | the number of rows. |
C | the number of columns. |
Scalar | the type of the entries in the matrix. |
|
staticconstexpr |
Defined in matrix.hpp
.
This variable has value true
if the template parameter T
is the same as ProjMaxPlusMat<R, C, Scalar> for some values of R
, C
, and Scalar
; and false
if it is not.
T | the type to check. |