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

remez_fir.h

Go to the documentation of this file.
00001 // author = "Jake Janovetz, Iain A Robin, and Tony Kirke"
00002 namespace SPUC {
00003 #ifndef RMZFIR
00004 #define RMZFIR
00005 #define  BANDPASS 1
00006 #define DIFFERENTIATOR 2
00007 #define HILBERT 3
00008 #define NEGATIVE 0
00009 #define POSITIVE 1
00010 #define GRIDDENSITY 16
00011 #define MAXITERATIONS 40
00012 /*-------------------------------------------------
00013  *  Copyright (C) 1995  Jake Janovetz (janovetz@coewl.cen.uiuc.edu)
00014  *
00015  *  This program is free software; you can redistribute it and/or modify
00016  *  it under the terms of the GNU General Public License as published by
00017  *  the Free Software Foundation; either version 2 of the License, or
00018  *  any later version.
00019  *
00020  *  This program is distributed in the hope that it will be useful,
00021  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00022  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023  *  GNU General Public License for more details.
00024  *
00025  *  You should have received a copy of the GNU General Public License
00026  *  along with this program; if not, write to the Free Software
00027  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00028  *
00029  ***********************************************************************/
00049 
00052 
00053 
00054 class remez_fir {
00055 
00056  public:
00057         remez_fir() {}  
00058 
00059  private:
00060         static void createDenseGrid(int r, int numtaps, int numband, double bands[],
00061                        double des[], double weight[], int gridSize,
00062                        double grid[], double d[], double w[],
00063                        int symmetry);
00064         static void initialGuess(int r, int ext[], int gridSize);
00065         static void calcParms(int r, int ext[], double grid[], double d[], double w[],
00066                                  double ad[], double x[], double y[]);
00067         static double computeA(double freq, int r, double ad[], double x[], double y[]);
00068         static void calcError(int r, double ad[], double x[], double y[],
00069                                  int gridSize, double grid[],
00070                                  double d[], double w[], double e[]);
00071         static void search(int r, int ext[], int gridSize, double e[]);
00072         static double* freqSample(double A[],int numtaps, int symm);
00073         static bool isDone(int r, int ext[], double e[]);
00074  public:
00075         static double* remez(int n, int numband,
00076                                                  double bands[], double des[], double weight[], int type);
00077 };
00078 #endif
00079 } // namespace SPUC 

Generated on Fri Sep 16 11:02:28 2005 for spuc by  doxygen 1.4.4