monomial_value, a Python code which evaluates a monomial in M dimensions.
Let X represent a point in M dimensional space, and let E be a vector of M integers. The value of the monomial with exponents E at the point X is
V(X) = X(1)^E(1) * X(2)^E(2) * ... * X(M)^E(M)This code supplies a convenient method of evaluating V(X) at multiple points X.
The factor 0.0^0 might occur if, for some I, we have X(I) = 0.0 and E(I) = 0. In this case, we take the corresponding value to be 1.
The factor 0.0^E(I) will cause problems if E(I) is negative.
The computer code and data files made available on this web page are distributed under the GNU LGPL license.
monomial_value is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version and a Python version.
monomial, a Python code which enumerates, lists, ranks, unranks and randomizes multivariate monomials in a space of M dimensions, with total degree less than N, equal to N, or lying within a given range.