source: sasmodels/example/polynomial.py @ 9d1e3e4

core_shell_microgelscostrafo411magnetic_modelticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change on this file since 9d1e3e4 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.