NaturalSemiring(int64_t, int64_t)ΒΆ

libsemigroups::NaturalSemiring::NaturalSemiring(int64_t t, int64_t p)

Construct from threshold and period.

This member function constructs a semiring whose elements are \(\{0, 1, ..., t, t + 1, ..., t + p - 1\}\) with operations addition and multiplication modulo the congruence \(t = t + p\).

The parameter t should be greater than or equal to 0, and the parameter p must be strictly greater than 0, both which are asserted in the constructor.