RE: Soliciting Comments on DSP Library

There are currently four libraries in the snapshot: DSP, Matrix, Poly, and Stat. I would like to add these to the official namespace, and would like to know where they should live.
Would you like to submit a proposal - or does the library snapshot you posted constitute a proposal? Would anyone else interested in DSPs care to comment on possible names for these libraries? In the current hierarchy design we have: Numeric DSP FastFourierTransform Noise Oscillator but given the size of your DSP library, perhaps moving it to the top level would be justified? The other question to ask is whether this is will be *the* DSP library, or whether there are other competing designs. If there are multiple designs, then the pattern we usually follow is to do something similar to the Text.PrettyPrint hierarchy, where we have Text.PrettyPrint.HughesPJ, Text.PrettyPrint.Wadler and so on.
Everything is GPL. I don't really care one way or another about this, but there is some code that I don't claim copyright to, and some derived code that inherits the GPL. In particular, MT19932.hs and Roots.hs have different copyright holders, and the original code was GPL. FFT.hs, FFTHard.hs, and PFA.hs have some derived code, so they have to inherit the GPL. I have to consult with the author, but IIRCookbook.lhs is a derived work, and I have a feeling that the license on this will be PD.
There is no problem with GPL code, but we must be careful with dependencies. Any code (library or otherwise) which depends on your library will potentially be required to be GPL'd too, so the license needs to be prominently displayed. Cheers, Simon

Simon Marlow wrote:
Would you like to submit a proposal - or does the library snapshot you posted constitute a proposal? Would anyone else interested in DSPs care to comment on possible names for these libraries?
Since it's populated, I think my current snapshot is a proposal. I will be adding more modules, but I don't really see adding any more sub-categories in the short term. I will probably need the categories DSP.IO DSP.Homomorphic but I'm not sure when I will get around to this.
In the current hierarchy design we have:
Numeric DSP FastFourierTransform Noise Oscillator
but given the size of your DSP library, perhaps moving it to the top level would be justified?
I am fine either way about DSP living at the top level, or under Numeric. I will submit to the consensus of Those Who Know Better, but here are my thoughts... I looked through the library archives for the discussions about the Numeric.DSP hierarchy, and it looks like the divisions listed above were based on my dormant, pre-resurrection library (I was buried under a rock at the time, someone please correct me if I am wrong). When I started working on the project again, I needed a way to organize everything, so my snapshot represents what I came up with. The Stat library could really live anywhere. It only contains functions for mean, median, variance, and std. dev. The Poly library could have a home somewhere else because it could be of use to people outside of DSP. Some people had suggested making it a subclass of Num. If this is the right thing to do, then there needs to be a discussion (or a little guidance) on how to implement it. My implementation is tailored to what I need and to make my life easier. The Matrix library should really be an FFI interface to the BLAS and LAPACK packages (or maybe GSL?). I think this is a huge undertaking, though. I implemented only what I needed to support the DSP library. Perhaps nodes in the hierarchy should have a Pending for modules/libraries that are needed and should have a standard interface, but don't yet. The caveat would be that users should not use the X.Y.Z.Pending functions directly. So, I would have DSP Pending Stat Poly Matrix The various groupings under DSP are a little arbitrary, but make sense to me. They are basically arranged the way they would be grouped in a DSP text. Unfortunately, because of overlap between fields, we could debate endlessly about where libraries live. For example, correlation is a central concept to DSP, but is really a statistical concept. The DFT and FFT have chapters dedicated to them in DSP texts, but are also concepts found in fast multidigit multiplication applications. Spectral estimation is an application of statistics theory, and has use in fields from DSP to financial market analysis. That said, I think what I have is fine, except as noted below. It may make sense for the FFT library to live outside the DSP tree. Among DSP practitioners, the terms "FFT" and "DFT" are used almost interchangeably, but DFT is probably a better name. A proper solution could be Numeric Transform DFT -- Discrete Fourier Transform DCT -- Discrete Cosine Transform DST -- Discrete Sine Transform DHT -- Discrete Hartley Transform ... Long names could be better to avoid confusion (there are several transforms that begin with H). The DSP.Signal portion could probably be split up. I'm not sure if anyone outside of DSP really needs the Oscillator functions, but the modules related to random numbers could live under Numeric. <insert sound of can opening and Lumbrici crawling out> Perhaps Numeric Random Generators -- MT19937, DRAND48, ... PDF -- Uniform, Normal, Poisson, Rayleigh, ... Spectral? -- White, Pink, Red, ... and possibly a standard way to glue them together. System.Random is probably fine for general purpose random numbers, but the above may be better for people who need tight control over what is generated.
The other question to ask is whether this is will be *the* DSP library, or whether there are other competing designs. If there are multiple designs, then the pattern we usually follow is to do something similar to the Text.PrettyPrint hierarchy, where we have Text.PrettyPrint.HughesPJ, Text.PrettyPrint.Wadler and so on.
If anyone has something similar, please speak up; I hate duplicating work. I think it would be best to have one library, and will gladly accept comments and code improvements. But if someone has objections, I will make my public version live under User (or wherever). Thanks all. -- Matthew Donadio (m.p.donadio@ieee.org)

You have to love replying to your own messages... Matthew Donadio wrote:
Since it's populated, I think my current snapshot is a proposal. I will be adding more modules, but I don't really see adding any more sub-categories in the short term. I will probably need the categories
DSP.IO DSP.Homomorphic
but I'm not sure when I will get around to this.
As I was shelving some books, I realized that there should also be a node DSP.Adaptive for adaptive filtering techniques, or DSP Filter Analog IIR FIR Adaptive I am going to rethink this over the weekend... -- Matthew Donadio (m.p.donadio@ieee.org)

Matthew Donadio
The Stat library could really live anywhere. It only contains functions for mean, median, variance, and std. dev.
I think we should have a library of statistics routines somewhere in the "official" hierarchy. I don't think it belongs under DSP, perhaps not even under Numeric? I have a bunch of functions (which I hesitate to call a library) that duplicates SAS's 'uniVar' functionality (what you mention above, as well as skew, kurtosis, and sums of squares) and which also does quantiles and some pretty printing. Ranging from simple to trivial, but well working IMHO, so I'd be happy to submit it if anybody wants it. (I've also got some more stuff for dealing with distributions (e.g. generating randoms from a specific distribution, calculating p-values, and so on), ANOVA and tests, but I haven't fleshed that part out enough for it to be very useful outside my own programs.) -kzm -- If I haven't seen further, it is by standing in the footprints of giants

I have just a few simple comments about naming.
The Stat library could really live anywhere. It only contains functions for mean, median, variance, and std. dev.
I suggest the fuller name 'Statistics', and indeed it does not belong under DSP. Possibly under Numeric, but maybe at the top level?
The Poly library could have a home somewhere else because it could be of use to people outside of DSP. Some people had suggested making it a subclass of Num.
'Poly' what? Polymorphic? Polynomial?
Numeric Transform DFT -- Discrete Fourier Transform DCT -- Discrete Cosine Transform DST -- Discrete Sine Transform DHT -- Discrete Hartley Transform
How about Numeric DiscreteTransform Fourier Cosine Sine Hartley
Numeric Random Generators -- MT19937, DRAND48, ... PDF -- Uniform, Normal, Poisson, Rayleigh, ... Spectral? -- White, Pink, Red, ...
PDF = Adobe Portable Document Format? No? Then what? My guess is Psomething Distribution Function, so how about Numeric.Random.Distribution? Regards, Malcolm
participants (4)
-
ketil@ii.uib.no
-
Malcolm Wallace
-
Matthew Donadio
-
Simon Marlow