Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

gr_fir_ccf.h

Go to the documentation of this file.
00001 /* -*- c++ -*- */
00002 /*
00003  * Copyright 2002,2003 Free Software Foundation, Inc.
00004  * 
00005  * This file is part of GNU Radio
00006  * 
00007  * GNU Radio is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation; either version 2, or (at your option)
00010  * any later version.
00011  * 
00012  * GNU Radio is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  * 
00017  * You should have received a copy of the GNU General Public License
00018  * along with GNU Radio; see the file COPYING.  If not, write to
00019  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00020  * Boston, MA 02111-1307, USA.
00021  */
00022 
00023 /*
00024  * WARNING: This file is automatically generated by generate_gr_fir_XXX.py
00025  * Any changes made to this file will be overwritten.
00026  */
00027 
00028 
00029 #ifndef INCLUDED_GR_FIR_CCF_H
00030 #define INCLUDED_GR_FIR_CCF_H
00031 
00032 #include <vector>
00033 #include <gr_types.h>
00034 #include <gr_reverse.h>
00035 
00047 class gr_fir_ccf {
00048 
00049 protected:
00050   std::vector<float>    d_taps;         // reversed taps
00051 
00052 public:
00053 
00054   // CONSTRUCTORS
00055 
00063   gr_fir_ccf () {}
00064   gr_fir_ccf (const std::vector<float> &taps) : d_taps (gr_reverse(taps)) {}
00065 
00066   virtual ~gr_fir_ccf ();
00067 
00068   // MANIPULATORS
00069 
00078   virtual gr_complex filter (const gr_complex input[]) = 0;
00079 
00086   virtual void filterN (gr_complex output[], const gr_complex input[],
00087                         unsigned long n) = 0;
00088 
00096   virtual void filterNdec (gr_complex output[], const gr_complex input[],
00097                            unsigned long n, unsigned decimate) = 0;
00098 
00102   virtual void set_taps (const std::vector<float> &taps)
00103   {
00104     d_taps = gr_reverse(taps);
00105   }
00106 
00107   // ACCESSORS
00108 
00112   unsigned ntaps () const { return d_taps.size (); }
00113 
00117   virtual const std::vector<float> get_taps () const
00118   {
00119     return gr_reverse(d_taps);
00120   }
00121 };
00122 
00123 #endif /* INCLUDED_GR_FIR_CCF_H */

Generated on Sat Jul 8 17:04:51 2006 for GNU Radio 2.x by  doxygen 1.4.1