Dom::MaxPlusSemiRing --
MaxPlus semi-ring
IntroductionDom::MaxPlusSemiRing creates a domain for the MaxPlus semi-ring.
DetailsDom::MaxPlusSemiRing(x) represents the constant x in the
MaxPlus semi-ring if x is a real number or real constant, or -∞ if
x is -infinity.
Creating Elements
Dom::MaxPlusSemiRing(x)
Parametersx | - | real number or -infinity. |
Cat::SemiRing
Related DomainsDom::MaxMinSemiRing, Dom::MinMaxSemiRing, Dom::MinPlusSemiRing
the constant -infinity.
the constant 0.
_plus(dom a1...)a1+a2+...+ak is defined to be the biggest
of real numbers or -infinity a1,a2,...,ak._plus.
_mult(dom a1...)a1*a2*...*ak is defined to be a1+a2+...+ak._mult.
_power(dom a,Dom::Integer n)a^n of the MaxPlus scalar a._power.
convert(any x)x into a MaxPlus scalar. This is
only possible if x is a real number or -infinity.
convert_to(dom a, any T)a into type T. Currently, only a
conversion into a type of scalars.
expr(dom a)a.
Example 1This example shows the idempotency of the MaxPlus semi-ring:
>> T:=Dom::MaxPlusSemiRing():
>> T(-infinity) + T(-infinity);
T(3) + T(3)
-infinity
3
>> T(6) + T(-infinity);
T(6) + T(3);
T(6)*T(-infinity);
T(6)*T(3)
6
6
-infinity
9
Example 2We can use real number and constants:
>> T(sin(2))*T(-2.15) + T(-PI)
-1.240702573
Example 3We can change the domain of scalars:
>> T::convert_to(T(1), Dom::Integer) + T::convert_to(T(2), Dom::Integer)
3
Super-DomainAx::canonicalRep, Ax::normalRep
Dom::MaxPlusSemiRing is a new function
MuPAD Combinat, an open source algebraic combinatorics package