boundlab.utils.Polynomial#

class boundlab.utils.Polynomial[source]#

Bases: object

Dense univariate polynomial \(P(x) = \sum_k c_k x^k\).

coeffs runs from the constant term up. Coefficients may be tensors, giving an independent polynomial per element. Besides ring arithmetic it supports composition (chain()), argument substitution (apply_add(), apply_ax()), differentiation, and sound interval evaluation (ibp()).

Methods

X

Polynomial representing x^n.

__init__

apply_add

P(x + shift)

apply_ax

P(a x)

apply_ax_reversed

P(x / a) * a^n

chain

P(Q(x))

derivative

ibp

Sound range of \(P\) over \([c - hw,\, c + hw]\).

mul

coeffs: list[Tensor | float]#
__init__(coeffs)[source]#
property degree: int#
static X(n=1)[source]#

Polynomial representing x^n.

__add__(other)[source]#
__mul__(other)[source]#
mul(other, mul=<built-in function mul>)[source]#
apply_add(shift, mul=<built-in function mul>)[source]#

P(x + shift)

apply_ax(a, mul=<built-in function mul>)[source]#

P(a x)

apply_ax_reversed(a, mul=<built-in function mul>)[source]#

P(x / a) * a^n

__call__(x)[source]#

Call self as a function.

chain(other, mul=<built-in function mul>)[source]#

P(Q(x))

derivative(order=1)[source]#
ibp(c, hw)[source]#

Sound range of \(P\) over \([c - hw,\, c + hw]\).

Substituting \(x = c + hw\,u\) reduces to bounding over \(u \in [-1, 1]\), where each monomial is elementary: odd powers of u range over \(\pm|a_k|\) and even powers over \([\min(a_k, 0), \max(a_k, 0)]\). Summing those per-monomial ranges is sound (though not tight — monomial correlations are ignored).