This page describes the functionality for matrices over the finite quotient of the max-plus semiring by the congruence for arbitrary and . The value is referred to as the threshold.
There are three types of such matrices where:
the dimension is known at compile-time;
the dimension is to be defined a run time but the arithmetic operations are known at compile-time (i.e. the value of is known at compile time)
both the dimension and the arithmetic operations (i.e. ) are to be defined a run time.
All three of these types can be accessed via the alias template MaxPlusTruncMat if T has value 0, then the threshold can be set at run time, and if R or C is 0, then the dimension can be set at run time. The default value of T is 0, R is 0, and of C is R.
The alias MaxPlusTruncMat is either StaticMatrix, DynamicMatrix (compile-timearithmetic)", or \ref DynamicMatrixDynamicArith "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
// construct an uninitialized 3 x 3 static matrix with threshold 11
if any entry in the matrix is not in the set where is the threshold of the matrix or if the underlying semiring is not defined (only applies to matrices with run time arithmetic).
if the entry val is not in the set where is the threshold of the matrix or if the underlying semiring is not defined (only applies to matrices with run time arithmetic).