GNU Radio 3.7.2 C++ API
adaptive_fir_ccc.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_CCC_H
24 #define INCLUDED_FILTER_ADAPTIVE_FIR_CCC_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 gr_complex 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(gr_complex 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  *
59  * See digital::cma_equalizer_cc and digital::lms_dd_equalizer_cc
60  * for example usage.
61  */
63  {
64  protected:
65 
66  public:
67  // gr::filter::adaptive_fir_ccc::sptr
69 
70  /*!
71  * \brief Adaptive FIR filter with gr_complex input, gr_complex output and gr_complex taps
72  *
73  * \param name Provides a name to identify this type of algorithm
74  * \param decimation (interger) decimation rate of the filter
75  * \param taps (complex) filter taps
76  */
77  static sptr make(const char *name, int decimation,
78  const std::vector<gr_complex> &taps);
79 
80  virtual void set_taps(const std::vector<gr_complex> &taps) = 0;
81  virtual std::vector<gr_complex> taps() const = 0;
82  };
83 
84  } /* namespace filter */
85 } /* namespace gr */
86 
87 #endif /* INCLUDED_FILTER_ADAPTIVE_FIR_CCC_H */
boost::shared_ptr< adaptive_fir_ccc > sptr
Definition: adaptive_fir_ccc.h:68
shared_ptr documentation stub
Definition: shared_ptr_docstub.h:15
Adaptive FIR filter with gr_complex input, gr_complex output and gr_complex taps. ...
Definition: adaptive_fir_ccc.h:62
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
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