GNU Radio 3.7.0-50 C++ API
adaptive_fir.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_H
24
#define INCLUDED_FILTER_ADAPTIVE_FIR_H
25
26
#include <
gnuradio/filter/api.h
>
27
#include <
gnuradio/filter/fir_filter.h
>
28
29
namespace
gr {
30
namespace
filter {
31
namespace
kernel {
32
33
/*!
34
* \brief Adaptive FIR filter kernel with gr_complex input,
35
* gr_complex output and gr_complex taps
36
*
37
* This class implements an adaptive FIR filter. Any class
38
* actually wanting to use adaptive FIRs will contain an object of
39
* this class.
40
*/
41
class
FILTER_API
adaptive_fir_ccc
:
public
fir_filter_ccc
42
{
43
public
:
44
adaptive_fir_ccc
(
int
decimation,
45
const
std::vector<gr_complex> &
taps
);
46
~
adaptive_fir_ccc
();
47
48
protected
:
49
// Override to calculate error signal per output
50
virtual
gr_complex
error(
const
gr_complex
&out) = 0;
51
52
// Override to calculate new weight from old, corresponding input
53
virtual
void
update_tap(
gr_complex
&tap,
const
gr_complex
&in) = 0;
54
55
gr_complex
d_error
;
56
};
57
58
59
/*!
60
* \brief Adaptive FIR filter kernel with gr_complex input,
61
* gr_complex output and float taps
62
*
63
* This class implements an adaptive FIR filter. Any class
64
* actually wanting to use adaptive FIRs will contain an object of
65
* this class.
66
*/
67
class
FILTER_API
adaptive_fir_ccf
:
public
fir_filter_ccf
68
{
69
public
:
70
adaptive_fir_ccf
(
int
decimation,
71
const
std::vector<float> &
taps
);
72
~
adaptive_fir_ccf
();
73
74
protected
:
75
// Override to calculate error signal per output
76
virtual
float
error(
const
gr_complex
&out) = 0;
77
78
// Override to calculate new weight from old, corresponding input
79
virtual
void
update_tap(
float
&tap,
const
gr_complex
&in) = 0;
80
81
float
d_error
;
82
};
83
84
}
/* namespace kernel */
85
}
/* namespace filter */
86
}
/* namespace gr */
87
88
#endif
/* INCLUDED_FILTER_ADAPTIVE_FIR_H */
gnuradio
gr-filter
include
gnuradio
filter
adaptive_fir.h
Generated by
1.8.1.1