(poly, x, x_lower, x_upper, doit=True, wf=1,
method="auto", CDS=False, tau=None,
points=1000, numeric=True)
| 2215 | return |
| 2216 | |
| 2217 | def _integrate_all_coeffs(poly, x, x_lower, x_upper, doit=True, wf=1, |
| 2218 | method="auto", CDS=False, tau=None, |
| 2219 | points=1000, numeric=True): |
| 2220 | """ |
| 2221 | """ |
| 2222 | results = {} |
| 2223 | terms = zip(poly.coeffs(), poly.monoms()) |
| 2224 | for coeff, (exp_1, exp_2) in terms: |
| 2225 | coeff = sp.factor(coeff) |
| 2226 | if doit and (len(coeff.atoms(sp.Symbol)) == 0 or coeff.atoms(sp.Symbol) == {x}): |
| 2227 | #coeff_func = sp.lambdify(x, coeff) |
| 2228 | #integral, error = quad(coeff_func, x_lower, x_upper) |
| 2229 | integral = _doVarNoiseData(coeff, numeric, method, CDS, tau, x_lower, x_upper, points, wf=wf)[0] |
| 2230 | else: |
| 2231 | try: |
| 2232 | if doit: |
| 2233 | integral = sp.integrate(coeff, (x, x_lower, x_upper)) |
| 2234 | else: |
| 2235 | integral = sp.Integral(coeff, (x, x_lower, x_upper)) |
| 2236 | except: |
| 2237 | raise NotImplementedError() |
| 2238 | results[(exp_1, exp_2)] = integral |
| 2239 | return results |
| 2240 | |
| 2241 | def _integrateCoeffs2(func, variables, x, x_lower, x_upper, doit=True, |
| 2242 | wf=1, method="auto", CDS=False, tau=None, |
no test coverage detected