Quasi-polynomials are useful for representing various combinatorial objects such as Hilbert/Ehrhart polynomials.
A quasi-polynomial is a list F_1,...,F_r
of r
univariate polynomials
(all in the same variable). Its value at the integer N
is defined to be
F_k(r)
where k = N mod r
.
QuasiPoly(L)
creates the quasi-polynomial whose consituents are the entries of L
(of type std::vector<RingElem>
)
There are only two operations on a quasi-polynomial (apart from assignment and printing):
QP(n)
evaluate the quasi-polynomial QP
at the integer n
constituents(QP)
returns a const std::vector<RingElem>&
of the constituents of QP
It could hardly be simpler!
Very simplistic first version. Assumes the constituents are univariate (but presumably the theory extends to multivariate?).
Printing is crude.
2014