he poly module contains the public classes Poly, Piece, PiecewisePoly and the
public functions Abs,Pow,Sqrt,T,S,Op,Convolution.
The class Poly is a representation of a polynomial. Piece is a representation
of a left-closed, right-open interval. PiecewisePoly is a representation of a
piecewise polynomial function with compact support.
The functions Abs and Sqrt take a PiecewisePoly object and return a callable
object. Pow returns a PiecewisePoly object.
T is a transport operation. S is a scale operation. Op is a combined transport
and scale. These take Piece,Poly or PiecewisePoly and act as described in the
definitions of wavelet analysis
The function Convolution performs the convolution of two piecewise polynomial
The object PiecewisePoly is equipped with algebraic operations, taking an
integral and restricting it to another interval.
The example code below assumes that the R Communicator of the section
Python to R Communicator
installed and the pyServer is running in an R shell. The following function
plots a graph of a function given by a poly.PiecewisePoly object.
def plotPoly(func,N=10000) :
a PiecewisePoly-nomial via r_com"
for i in range(0,N+1)]
for xx in x]
Consider the following session.
The line  constructs a PiecewisePoly object. The argument of poly.Poly is a
list of coefficients of the polynomial f(x)=1. The two arguments of poly.Piece
are boundaries of the interval. The poly.PiecewisePoly accepts a list of
The example below constructs and plots a "centered hut" along the same
operations, integration and convolution are illustrated in the following