3.1.15. horton/moments.h – Efficient evaluation of various of polynomials


long fill_cartesian_polynomials(double *output, long lmax)

Compute Cartesian mononomials efficiently.

Computes all Cartesian mononomials (x, y, z) up to a given order in alphabetical order. The first three elements of output must contain x, y and z.

The position of the first mononomial of the highest order.
  • output -

    The output array, which must be sufficiently large.

  • lmax -

    The highest order of the mononomials.

long fill_pure_polynomials(double *output, long lmax)
long fill_pure_polynomials_array(double *output, long lmax, long nrep, long stride)
void fill_radial_polynomials(double *output, long lmax)