Below are program source listings for FIR.h and FIR.cpp, the header file and class file for implementing arbitrary causal FIR filters in the Synthesis Tool Kit (STK) framework [15,18].
Note that FIR filters can be obtained as a special case of IIR
filters. A C++ class for IIR digital filters is included in
the STK. (See the Filter STK class.) When the feedback
coefficients (called `` coefficients'') are zero, a general
(causal) FIR filter is obtained. The class below was written before
the Filter STK class existed, so it is included here mainly
as a tutorial example of how STK classes may be written. See
[87]I.1 for a tutorial introduction to using and
developing for the STK.