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

bch.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*
00002  *                                   IT++                                    *
00003  *---------------------------------------------------------------------------*
00004  * Copyright (c) 1995-2001 by Tony Ottosson, Thomas Eriksson, Pål Frenger,   *
00005  * Tobias Ringström, and Jonas Samuelsson.                                   *
00006  *                                                                           *
00007  * Permission to use, copy, modify, and distribute this software and its     *
00008  * documentation under the terms of the GNU General Public License is hereby *
00009  * granted. No representations are made about the suitability of this        *
00010  * software for any purpose. It is provided "as is" without expressed or     *
00011  * implied warranty. See the GNU General Public License for more details.    *
00012  *---------------------------------------------------------------------------*/
00013 
00024 #ifndef _bch_h
00025 #define _bch_h
00026 
00027 #include "gfx.h"
00028 namespace SPUC {
00033 //---------------------- BCH --------------------------------------
00034 
00049 class BCH {
00050 public:
00052   BCH(int in_n, int in_k, int in_t, ivec genpolynom);
00054   bvec encode(const bvec &uncodedbits);
00056   bvec decode(const bvec &codedbits);
00058   double get_rate() {return double(k)/double(n); }
00059 
00060 //protected:
00061 private:
00062     int n, k, t;
00063     gfx g;
00064 };
00065 }
00066 #endif // _bch_h

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