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

max_pn.h

Go to the documentation of this file.
00001 // 
00002 // Copyright(c) 1993-1996 Tony Kirke
00003 // author="Tony Kirke" *
00004 /*
00005  * SPUC - Signal processing using C++ - A DSP library
00006  * 
00007  * This program 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  * This program 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 this program; if not, write to the Free Software
00019  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00020 */
00021 #ifndef MAXPN
00022 #define MAXPN
00023 namespace SPUC {
00030 
00031 
00032 
00033 
00034 
00035 
00036 
00037 
00038 
00039 
00040 class max_pn
00041 {
00042         protected:
00043                 int lenp1;
00044                 int gen;                                          
00045                 int u;
00046 
00047         public:
00049                 max_pn(int g=0x006d, int len=63, int init=-1) : gen(g), lenp1(len+1), u(init) {;}
00050                 //              max_pn(int g=0x074d, int len=1023, int init=-1) : gen(g), lenp1(len+1), u(init) {;}
00052                 void reset() { u = -1; }
00054                 signed char out(); 
00055                 bool get_bit(); 
00056 
00057                 signed char out1();
00058                 int state() { return(u); }
00059 } ; 
00060 } // namespace SPUC 
00061 #endif

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