ccsoft  0.0.0
Convolutional codes library with soft decision decoding
/shared/development/google_code/rssoft/libccsoft/lib/CC_Encoding_FA.h
Go to the documentation of this file.
00001 /*
00002  Copyright 2013 Edouard Griffiths <f4exb at free dot fr>
00003 
00004  This file is part of CCSoft. A Convolutional Codes Soft Decoding library
00005 
00006  This program is free software; you can redistribute it and/or modify
00007  it under the terms of the GNU General Public License as published by
00008  the Free Software Foundation; either version 2 of the License, or
00009  (at your option) any later version.
00010 
00011  This program is distributed in the hope that it will be useful,
00012  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  GNU General Public License for more details.
00015 
00016  You should have received a copy of the GNU General Public License
00017  along with this program; if not, write to the Free Software
00018  Foundation, Inc., 51 Franklin Street, Boston, MA  02110-1301  USA
00019 
00020  Convolutional encoder class.
00021 
00022  This version uses a fixed array for internal registers
00023 
00024  */
00025 #ifndef __CC_ENCODING_FA_H__
00026 #define __CC_ENCODING_FA_H__
00027 
00028 #include "CC_Encoding_base.h"
00029 #include "CC_EncodingRegisters_FA.h"
00030 #include "CCSoft_Exception.h"
00031 #include <vector>
00032 #include <iostream>
00033 #include <array>
00034 #include <algorithm>
00035 
00036 namespace ccsoft
00037 {
00038 
00045 template<typename T_Register, typename T_IOSymbol, unsigned int N_k>
00046 class CC_Encoding_FA : public CC_Encoding_base<T_Register, T_IOSymbol>, public CC_EncodingRegisters_FA<T_Register, N_k>
00047 {
00048 public:
00049     //=============================================================================================
00059     CC_Encoding_FA(const std::vector<unsigned int>& _constraints, const std::vector<std::vector<T_Register> >& _genpoly_representations) :
00060         CC_Encoding_base<T_Register, T_IOSymbol>(_constraints, _genpoly_representations),
00061         CC_EncodingRegisters_FA<T_Register, N_k>()
00062     {
00063     }
00064 
00065     //=============================================================================================
00069     virtual ~CC_Encoding_FA()
00070     {}
00071     
00072     //=============================================================================================
00077     virtual T_Register& get_register(unsigned int index)
00078     {
00079         return RegisterClass::get_register(index);
00080     }
00081     
00082 protected:
00083     typedef CC_EncodingRegisters_FA<T_Register, N_k> RegisterClass;
00084 };
00085 
00086 } // namespace ccsoft
00087 
00088 
00089 #endif // __CC_ENCODING_FA_H__
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines