source: sasmodels/example/polynomial.py @ 535fee6

core_shell_microgelsmagnetic_modelticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change on this file since 535fee6 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
RevLine 
[c499331]1from numpy import inf
2parameters = [
[d19962c]3    ["n", "", 1, [1,5], "", "number of coefficients (or degree+1)"],
[c499331]4    ["c[n]", "", 0, [-inf, inf], "", "coefficients to c_n x^n"],
5]
6
[d19962c]7Iq = r"""
[c499331]8    int int_n = (int)n;
[d19962c]9    double result = c[int_n-1];
10    for (int k=int_n-2; k >= 0; k--) { result = result*q + c[k]; }
[c499331]11    return result;
12    """
Note: See TracBrowser for help on using the repository browser.