Dom::MinPlusSemiRing
--
MinPlus semi-ring
Dom::MinPlusSemiRing
creates a domain for the MinPlus semi-ring.
Dom::MinPlusSemiRing
(x)
represents the constant x in the
MinPlus semi-ring if x is a real number or real constant, or ∞ if x
is infinity.
Dom::MinPlusSemiRing
(x)
x | - | real number or infinity. |
Cat::SemiRing
Dom::MaxMinSemiRing
, Dom::MaxPlusSemiRing
, Dom::MinMaxSemiRing
the constant infinity.
the constant 0.
_plus(dom a1...)
a1+a2+...+ak
is defined to be the smallest
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 MinPlus scalar a
._power
.
convert(any x)
x
into a MinPlus 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
.This example shows the idempotency of the MinPlus semi-ring:
>> T:=Dom::MinPlusSemiRing():
>> 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 3 infinity 9
We can use real number and constants:
>> T(sin(2))*T(-2.15) + T(-PI)
-PI
We can change the domain of scalars:
>> T::convert_to(T(1), Dom::Integer) + T::convert_to(T(2), Dom::Integer)
3
Ax::canonicalRep, Ax::normalRep
Dom::MinPlusSemiRing
is a new function
MuPAD Combinat, an open source algebraic combinatorics package