How to handle input/output types for a signal processing library?
<p>OK - so I have a library that I'm working on.  Basically a block signal processing library.  It's implemented with a top level 'Block' class and each derived block implements a signal processing operation, e.g., addition is an 'AddBlock', etc.</p>

<p>Until now, I've relied on the inputs and outputs to be an array of double, specifically, the array type is based on the blitz++ library.  Everything has been working great.</p>

<p>However, I now want to include the ability to process arrays with complex numbers, particular in the outputs of an 'FFT block'  (or alternatively, the inputs of an 'IFFT block').</p>

<p>So my question is:  How best to cater for this?</p>

<p>Do I parameterize each class based on the input and output type?  (read: the data type stored in the array).  Or is there a better way to do this?</p>

<p>Alternatively, should I encapsulate the input/output objects into a separate class to abstract their actual representation?  (This could be a possibility given it's generally easy enough to provide the operation on an abstraction basis, if that makes sense...)</p>

<p>I've thought on this a bit...  Quite a bit.  Any thoughts?</p>

<p>Thanks in advance.</p>
