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