Main Page | Namespace List | Class Hierarchy | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages

gr_fir< o_type, i_type, tap_type > Class Template Reference

base class template for Finite Impulse Response filter (FIR) More...

#include <gr_fir.h>

List of all members.

Public Member Functions

 gr_fir (const vector< tap_type > &new_taps)
 construct new FIR with given taps.

 gr_fir ()
virtual ~gr_fir ()
virtual o_type filter (const i_type input[])
 compute a single output value.

virtual void filterN (o_type output[], const i_type input[], unsigned long n)
 compute an array of N output values.

virtual void filterNdec (o_type output[], const i_type input[], unsigned long n, unsigned decimate)
 compute an array of N output values, decimating the input

unsigned ntaps () const
virtual void set_taps (const vector< tap_type > &new_taps)
 install new_taps as the current taps.


Protected Attributes

vector< tap_typetaps


Detailed Description

template<class o_type, class i_type, class tap_type>
class gr_fir< o_type, i_type, tap_type >

base class template for Finite Impulse Response filter (FIR)


Constructor & Destructor Documentation

template<class o_type, class i_type, class tap_type>
gr_fir< o_type, i_type, tap_type >::gr_fir const vector< tap_type > &  new_taps  )  [inline]
 

construct new FIR with given taps.

Note that taps must be in backwards order, e.g., coefficient 0 is stored in new_taps[N-1], coefficient 1 is stored in new_taps[N-2], etc.

template<class o_type, class i_type, class tap_type>
gr_fir< o_type, i_type, tap_type >::gr_fir  )  [inline]
 

template<class o_type, class i_type, class tap_type>
virtual gr_fir< o_type, i_type, tap_type >::~gr_fir  )  [inline, virtual]
 


Member Function Documentation

template<class o_type, class i_type, class tap_type>
o_type gr_fir< o_type, i_type, tap_type >::filter const i_type  input[]  )  [virtual]
 

compute a single output value.

input must have ntaps() valid entries. input[0] .. input[ntaps() - 1] are referenced to compute the output value.

Returns:
the filtered input value.

template<class o_type, class i_type, class tap_type>
void gr_fir< o_type, i_type, tap_type >::filterN o_type  output[],
const i_type  input[],
unsigned long  n
[virtual]
 

compute an array of N output values.

input must have (n - 1 + ntaps()) valid entries. input[0] .. input[n - 1 + ntaps() - 1] are referenced to compute the output values.

template<class o_type, class i_type, class tap_type>
void gr_fir< o_type, i_type, tap_type >::filterNdec o_type  output[],
const i_type  input[],
unsigned long  n,
unsigned  decimate
[virtual]
 

compute an array of N output values, decimating the input

input must have (decimate * (n - 1) + ntaps()) valid entries. input[0] .. input[decimate * (n - 1) + ntaps() - 1] are referenced to compute the output values.

template<class o_type, class i_type, class tap_type>
unsigned gr_fir< o_type, i_type, tap_type >::ntaps  )  const [inline]
 

Returns:
number of taps in filter.

template<class o_type, class i_type, class tap_type>
virtual void gr_fir< o_type, i_type, tap_type >::set_taps const vector< tap_type > &  new_taps  )  [inline, virtual]
 

install new_taps as the current taps.


Member Data Documentation

template<class o_type, class i_type, class tap_type>
vector<tap_type> gr_fir< o_type, i_type, tap_type >::taps [protected]
 


The documentation for this class was generated from the following file:
Generated on Tue Mar 30 21:32:06 2004 for GNU Radio by doxygen 1.3.2