next up previous contents
Next: The SimpleStack class Up: Utility classes Previous: The FIR class

The IIR class

This class implements a first order infinite impulse response filter. To use it, #include "IIR.cc" into whatever file you want to have the class in. Then you need a statement similar to the following for a declaration:

      IIR<float> filter(.25,.75)

Replace "float" with whatever input/output type you want to use, and ".25" with the weight you want for the old average, and ".75" with your weight for the new data. The weights must add up to 1.0, or you will get an error message when the filter is initialized.



Philip A. Wilsey
1/26/1998