goulib.polynomial

simple manipulation of polynomials (without SimPy) see http://docs.sympy.org/dev/modules/polys/reference.html if you need more …

Functions

_parse_n(str)

Parse the number part of a polynomial string term

_parse_p(str)

Parse the power part of a polynomial string term

_strip_leading_zeros(p)

Remove the leading (in terms of high orders of x) zeros in the polynomial

_tostring_term(c, i, **kwargs)

Convert a single coefficient c and power e to a string cx^i

add(p1, p2)

Return a new plist corresponding to the sum of the two input plists.

derivative(plist)

Return a new plist corresponding to the derivative of the input plist.

integral(plist)

Return a new plist corresponding to the integral of the input plist.

mult_const(p, c)

Return a new plist corresponding to the input plist multplied by a const

mult_one(p, c, i)

Return a new plist corresponding to the product of the input plist p with the single term c*x^i

multiply(p1, p2)

Return a new plist corresponding to the product of the two input plists

parse_string(s)

Do very, very primitive parsing of a string into a plist.

peval(plist, x[, x2])

Eval the plist at value x.

plist(term)

Force term to have the form of a polynomial list

power(p, e)

Return a new plist corresponding to the e-th power of the input plist p

sub(p1, p2)

tostring(p, **kwargs)

Convert a plist into a string.

Classes

Polynomial(val)