four_multi
Multi-Antenna,Multi-Node,Multi-Band,Multi-Cell
modem/LDPC1.hpp
00001 // Copyright 2011-2013, Nima Najari Moghadam and Per Zetterberg
00002 //                      KTH Royal Institute of Technology
00003 // 
00004 //
00005 // This program is free software: you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License as published by
00007 // the Free Software Foundation, either version 3 of the License, or
00008 // (at your option) any later version.
00009 //
00010 // This program is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU General Public License
00016 // along with this program.  If not, see <http://www.gnu.org/licenses/>.
00017 //
00018 
00019 
00020 #ifndef LDPC1_HPP
00021 #define LDPC1_HPP
00022 
00023 #include <itpp/itcomm.h>
00024 #include "modem_OFDM1.hpp"
00025 #include <vector>
00026 
00027 using namespace itpp;
00028 
00030 class LDPC1 {  
00031 
00032    public:
00033      LDPC1(void) {}; 
00034      void init(double chan_code_rate, 
00035                int msg_length, int seed, bool load_from_file, string filename);
00036      void chan_encode(bvec message, bvec &code_word);
00037      void chan_decode(vec &soft_input,bvec &message_hat);
00038      double chan_code_rate(void) {return d_chan_code_rate;};
00039      int message_length(void) const {return k;};
00040      int word_length(void) {return Nvar;};
00041      int seed(void) {return d_seed;};
00042    private:
00043      double d_chan_code_rate;
00044      int k;
00045      int d_seed;
00046      Sequence_Interleaver<double> d_interleaver;
00047      int Nvar;   // codeword length
00048      LDPC_Generator_Systematic G;
00049      LDPC_Parity_Regular H;
00050      LDPC_Code Code;    
00051      vec code_word1, code_word2; 
00052 
00053   //int Imax;
00054   //ivec interleaver_sequence;
00055   //QAM qam;
00056   //OFDM1 ai;
00057   //vec LLR;
00058 };
00059 
00060 
00061 #endif
 All Classes Functions Variables