Piecewise defined functions



> From: Lukasz Stafiniak [mailto:lukstafi at wp]

> My piecewise defined functions emerged from taking maximum of 
> a number of
> polynomials (which in turn from taking a supremum of a 
> polynomial in another
> variable), so they are continuous.
> I've started writing a tiny library for functions defined as e.g. [x =
> MINF, -x, x = -2, 2, x = 2, x, x = INF]. But then I've 
> browsed the archive
> and found propositions to use 'boxcars' (U(x - a) - U(x - 
> b)), U(x) = 0 for
> x < 0, 1 for x > 0. What do you think?
> 
> Perhaps writing datatypes for mathematical objects from 
> scratch, when they
> can be encoded in the existing machinery, is no good.
> 

In case you want a simpler conceptual form; piecewise polynomial forms can
be represented directly by a series of Dirac delta functions of various
orders, stationed at the break points.  This has some advantages doing
manipulation and spectral estimation.

Ray