Seeking More Advice on Library

Andrew J Bromage
Thu, 8 May 2003 14:21:42 +1000


On Wed, May 07, 2003 at 11:34:28AM -0400, Matthew Donadio wrote:

> One of the needs for a few of my DSP routines is support for functions
> over polynomials.  The attached file is what I threw together.
> Since this definetly has a broader scope than just me, I wanted to get
> some opionions on it.

Are you trying to write a general polynomial library, or just one
which suits your purpose?  Or, to put it another way, how many programs
can you think of which would need both DSP code and non-DSP-related
polynomial crunching?

I would take the XP approach: Make a polynomial library which is
powerful enough to do what you want with it and put it in your own
namespace.  If someone comes out with a more general polynomial
library later which is suitable for your purpose, refactor your code

> The big question here (in my mind) is how to represent polynomials.  The
> most obvious way is as a list of the coefficients.  They can also be
> represented as a list of the roots.

You can also represent them as sparse coefficients and as some
combination of basis polynomials other than the "power polynomials".

Then, of course, there's multivariate polynomials.

> 2.  Are there any functions that are missing?

Yes, lots.

Andrew Bromage