3 * Copyright 2002 Free Software Foundation, Inc.
5 * This file is part of GNU Radio
7 * GNU Radio is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3, or (at your option)
12 * GNU Radio is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with GNU Radio; see the file COPYING. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street,
20 * Boston, MA 02110-1301, USA.
22 #ifndef INCLUDED_GR_FIR_FFF_GENERIC_H
23 #define INCLUDED_GR_FIR_FFF_GENERIC_H
25 #include <gr_fir_fff.h>
28 * \brief Concrete class for generic implementation of FIR with float input, float output and float taps
30 * The trailing suffix has the form _IOT where I codes the input type,
31 * O codes the output type, and T codes the tap type.
32 * I,O,T are elements of the set 's' (short), 'f' (float), 'c' (gr_complex), 'i' (int)
35 class gr_fir_fff_generic : public gr_fir_fff {
41 gr_fir_fff_generic () {}
42 gr_fir_fff_generic (const std::vector<float> &taps) : gr_fir_fff (taps) {}
47 * \brief compute a single output value.
49 * \p input must have ntaps() valid entries.
50 * input[0] .. input[ntaps() - 1] are referenced to compute the output value.
52 * \returns the filtered input value.
54 virtual float filter (const float input[]);
57 * \brief compute an array of N output values.
59 * \p input must have (n - 1 + ntaps()) valid entries.
60 * input[0] .. input[n - 1 + ntaps() - 1] are referenced to compute the output values.
62 virtual void filterN (float output[], const float input[],
66 * \brief compute an array of N output values, decimating the input
68 * \p input must have (decimate * (n - 1) + ntaps()) valid entries.
69 * input[0] .. input[decimate * (n - 1) + ntaps() - 1] are referenced to
70 * compute the output values.
72 virtual void filterNdec (float output[], const float input[],
73 unsigned long n, unsigned decimate);
77 #endif /* INCLUDED_GR_FIR_FFF_GENERIC_H */