source: sasmodels/example/polynomial.py @ 1a8b91c

Last change on this file since 1a8b91c was d19962c, checked in by Paul Kienzle <pkienzle@…>, 9 years ago

working vector parameter example using dll engine

  • Property mode set to 100644
File size: 333 bytes
Line 
1from numpy import inf
2parameters = [
3    ["n", "", 1, [1,5], "", "number of coefficients (or degree+1)"],
4    ["c[n]", "", 0, [-inf, inf], "", "coefficients to c_n x^n"],
5]
6
7Iq = r"""
8    int int_n = (int)n;
9    double result = c[int_n-1];
10    for (int k=int_n-2; k >= 0; k--) { result = result*q + c[k]; }
11    return result;
12    """
Note: See TracBrowser for help on using the repository browser.