GNU Radio 3.7.2 C++ API
adaptive_fir_ccf.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2011,2012 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
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)
10  * any later version.
11  *
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.
16  *
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.
21  */
22 
23 #ifndef INCLUDED_FILTER_ADAPTIVE_FIR_CCF_H
24 #define INCLUDED_FILTER_ADAPTIVE_FIR_CCF_H
25 
26 #include <gnuradio/filter/api.h>
28 
29 namespace gr {
30  namespace filter {
31 
32  /*!
33  * \brief Adaptive FIR filter with gr_complex input, gr_complex output and float taps
34  * \ingroup filter_blk
35  *
36  * \details
37  * This is a base class to implement an adaptive FIR
38  * filter. Generally, another block will inherit from this one to
39  * build a new type of adaptive filter such as an equalizer.
40  *
41  * This class implements two functions that are designed to be
42  * overloaded by the child class: error(gr_complex out) and
43  * update_tap(float tap, gr_complex in).
44  *
45  * The error() function calculates the error value that will be
46  * used to adjust the taps. The update_tap function then uses the
47  * error and the input signal value to update a particular
48  * tap. Typically, the error is calculated for a given output and
49  * then this is used in a loop to update all of the filter taps in
50  * a loop:
51  *
52  * \code
53  * d_error = error(sum);
54  * for(k = 0; k < l; k++) {
55  * update_tap(d_taps[ntaps-k-1], in[i+k]);
56  * }
57  * \endcode
58  */
60  {
61  public:
62  // gr::filter::adaptive_fir_ccf::sptr
64 
65  /*!
66  * \brief Adaptive FIR filter with gr_complex input, gr_complex output and float taps
67  *
68  * \param name Provides a name to identify this type of algorithm
69  * \param decimation (interger) decimation rate of the filter
70  * \param taps (real) filter taps
71  */
72  static sptr make(const char *name, int decimation,
73  const std::vector<float> &taps);
74 
75  virtual void set_taps(const std::vector<float> &taps) = 0;
76  virtual std::vector<float> taps() = 0;
77  };
78 
79  } /* namespace filter */
80 } /* namespace gr */
81 
82 #endif /* INCLUDED_FILTER_ADAPTIVE_FIR_CCF_H */
boost::shared_ptr< adaptive_fir_ccf > sptr
Definition: adaptive_fir_ccf.h:63
shared_ptr documentation stub
Definition: shared_ptr_docstub.h:15
synchronous N:1 input to output with historyOverride work to provide the signal processing implementa...
Definition: sync_decimator.h:37
static const float taps[NSTEPS+1][NTAPS]
Definition: interpolator_taps.h:9
Adaptive FIR filter with gr_complex input, gr_complex output and float taps.
Definition: adaptive_fir_ccf.h:59
VOLK_API $kern pname $kern name
A function pointer to the dispatcher implementation.
#define FILTER_API
Definition: gr-filter/include/gnuradio/filter/api.h:30