Defined in matrix.hpp
.
This page describes the functionality for \(n \times n\) matrices over the min-plus semiring for arbitrary dimension \(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 MinPlusMat: if N
has value 0
, then the dimensions can be set at run time, otherwise N
is the dimension. The default value of N
is 0
.
The alias MinPlusMat 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 matrices is that the former can be default constructed and the latter should be constructed using the dimensions.
- Example
std::conditional_t< R==0||C==0, DynamicMinPlusMat< Scalar >, StaticMinPlusMat< R, C, Scalar > > MinPlusMat
Alias template for min-plus matrices.
Definition matrix.hpp:4894
|
template<typename Scalar> |
using | DynamicMinPlusMat |
| Alias for dynamic min-plus matrices.
|
|
template<size_t R = 0, size_t C = R, typename Scalar = int> |
using | MinPlusMat |
| Alias template for min-plus matrices.
|
|
template<size_t R, size_t C, typename Scalar> |
using | StaticMinPlusMat |
| Alias for static min-plus matrices.
|
|
|
template<typename Mat> |
std::enable_if_t< IsMinPlusMat< Mat > > | throw_if_bad_entry (Mat const &, typename Mat::scalar_type val) |
| Check that an entry in a min-plus matrix is valid.
|
|
template<typename Mat> |
std::enable_if_t< IsMinPlusMat< Mat > > | throw_if_bad_entry (Mat const &x) |
| Check that a min-plus matrix is valid.
|
|
◆ DynamicMinPlusMat
template<typename Scalar>
Initial value: DynamicMatrix<MinPlusPlus<Scalar>,
Scalar>
Function object for returning the additive identity.
Definition matrix.hpp:4188
Function object for multiplication in the min-plus semiring.
Definition matrix.hpp:4786
Function object for returning the additive identity of the min-plus semiring.
Definition matrix.hpp:4823
Defined in matrix.hpp
.
Alias for the type of dynamic min-plus matrices where the dimensions of the matrices can be defined at run time.
- Template Parameters
-
Scalar | the type of the entries in the matrix. |
◆ MinPlusMat
template<size_t R = 0, size_t C = R, typename Scalar = int>
Initial value: std::conditional_t<R == 0 || C == 0,
DynamicMatrix< MinPlusPlus< Scalar >, MinPlusProd< Scalar >, MinPlusZero< Scalar >, IntegerZero< Scalar >, Scalar > DynamicMinPlusMat
Alias for dynamic min-plus matrices.
Definition matrix.hpp:4851
StaticMatrix< MinPlusPlus< Scalar >, MinPlusProd< Scalar >, MinPlusZero< Scalar >, IntegerZero< Scalar >, R, C, Scalar > StaticMinPlusMat
Alias for static min-plus matrices.
Definition matrix.hpp:4870
Defined in matrix.hpp
.
Alias template for min-plus matrices.
- Template Parameters
-
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 ). |
◆ StaticMinPlusMat
template<size_t R, size_t C, typename Scalar>
Initial value:
R,
C,
Scalar>
Static matrix class.
Definition matrix.hpp:1859
Defined in matrix.hpp
.
Alias for static min-plus matrices whose arithmetic and dimensions are defined at compile-time.
- Template Parameters
-
R | the number of rows. |
C | the number of columns. |
Scalar | the type of the entries in the matrix. |
◆ throw_if_bad_entry() [1/2]
template<typename Mat>
std::enable_if_t< IsMinPlusMat< Mat > > throw_if_bad_entry |
( |
Mat const & | , |
|
|
typename Mat::scalar_type | val ) |
Defined in matrix.hpp
.
This function can be used to check that an entry in a matrix belongs to the underlying semiring.
- Template Parameters
-
- Parameters
-
- Exceptions
-
◆ throw_if_bad_entry() [2/2]
template<typename Mat>
std::enable_if_t< IsMinPlusMat< Mat > > throw_if_bad_entry |
( |
Mat const & | x | ) |
|
Defined in matrix.hpp
.
This function can be used to check that a matrix contains values in the underlying semiring.
- Template Parameters
-
- Parameters
-
- Exceptions
-