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

trellissoftout.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           trellissoftout.h  -  description
00003                              -------------------
00004     begin                : Mit Aug 6 2003
00005     copyright            : (C) 2003 by Peter Haase
00006     email                : p.haase@tuhh.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This library is free software; you can redistribute it and/or         *
00012  *   modify it under the terms of the GNU Lesser General Public            *
00013  *   License as published by the Free Software Foundation; either          *
00014  *   version 2.1 of the License, or (at your option) any later version.    *
00015  *                                                                         *
00016  *   This library is distributed in the hope that it will be useful,       *
00017  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00018  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00019  *   Lesser General Public License for more details.                       *
00020  *                                                                         *
00021  *   You should have received a copy of the GNU Lesser General Public      *
00022  *   License along with this library; if not, write to the Free Software   *
00023  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston,                 *
00024  *   MA  02111-1307  USA                                                   *
00025  *                                                                         *
00026  ***************************************************************************/
00027 
00028 #ifndef TRELLISSOFTOUT_H
00029 #define TRELLISSOFTOUT_H
00030 
00031 #include <iostream>
00032 #include <iomanip>
00033 #include <complex>
00034 #include <stdexcept>
00035 #include <algorithm>
00036 #include <memory>
00037 
00038 
00039 #include "signals.h"
00040 #include "misc.h"
00041 #include "phbib.h"
00042 #include "trellis.h"
00043 
00044 
00045 
00046 
00047 namespace simthlib
00048 {
00049 
00050 
00058 class TrellisSoftoutAlgorithm 
00059 {
00060 
00061    public:
00062 
00065     TrellisSoftoutAlgorithm(std::auto_ptr<simthlib::Trellis> usedTrellis);
00066 
00069     virtual ~TrellisSoftoutAlgorithm( );
00070 
00073     virtual void softout4Output(const simth::LlvSeq &metr, simth::LlrSeq* softout, const simth::LlrSeq* apri = NULL) = 0;
00074 
00077     virtual void softout4Input(const simth::LlvSeq &metr, simth::LlrSeq* softout, const simth::LlrSeq* apri = NULL) = 0;
00078 
00079 
00085     virtual void decode(const simth::LlvSeq &metr, simth::BitSeq* decodedData, const simth::LlrSeq* apri = NULL) = 0;
00086 
00087 
00091     //virtual void reducedSoftout4Output(const simth::LlvSeq &metr, simth::LlrSeq* softout, const simth::LlrSeq* apri,
00092     //                                  int startState, int endState) = 0;
00093 
00096     const simthlib::Trellis* getTrellis() {return usedTrellis_;}
00097     
00098   protected:
00099 
00100     simthlib::Trellis* usedTrellis() {return usedTrellis_;}
00101 
00102     size_t pathLength() const {return pathLength_;}
00103 
00104     void setPathLength(int newPathLength);
00105 
00106   private:
00107 
00108     simthlib::Trellis* usedTrellis_;    
00109 
00110     size_t pathLength_;
00111 
00112     void invariante() const;
00113 };
00114 
00115 
00116 inline void TrellisSoftoutAlgorithm::invariante() const
00117 {
00118   if(DEBUG){
00119   }
00120 }
00121 
00122 
00123 inline void TrellisSoftoutAlgorithm::setPathLength(int newPathLength)
00124 {
00125   pathLength_ = newPathLength;
00126   invariante();
00127 }
00128 
00129 
00130 namespace trellissoftout{
00131 
00133 enum softoutalgorithmmode {SOVA, MAXLOGMAP, LOGMAP};
00134 
00136 enum sova_type {CODER_IN, CODER_OUT};
00137 
00138 
00144 std::auto_ptr<TrellisSoftoutAlgorithm> makeSoftoutAlgorithm(softoutalgorithmmode mode, int mem,
00145                                                       int inSymbols, int outSymbols);
00151 std::auto_ptr<TrellisSoftoutAlgorithm> makeSoftoutAlgorithm(softoutalgorithmmode mode, int inSymbolsPerStep,
00152                                                       const simth::checkedVector<int>& polynomials);
00158 std::auto_ptr<TrellisSoftoutAlgorithm> makeSoftoutAlgorithm(softoutalgorithmmode mode, int inSymbolsPerStep,
00159               const simth::checkedVector<int>& polynomials, int recursivePolynomial, bool systematic);
00160 
00166 std::auto_ptr<TrellisSoftoutAlgorithm> makeSoftoutAlgorithm(softoutalgorithmmode mode, int inSymbolsPerStep,
00167               int bitsPerSymbol, simthlib::ConvCodeTrellis::StartingMode startingMode, simthlib::map_type mappMode, 
00168               const simth::checkedVector<int>& polynomials, int recursivePolynomial);
00169               
00175 std::auto_ptr<TrellisSoftoutAlgorithm> makeExplicitSoftoutAlgorithm(softoutalgorithmmode mode,int inputBitsPerStep, int outputBitsPerStep, 
00176                                     simthlib::ConvCodeTrellis::StartingMode startingMode, simthlib::map_type mappMode);
00177 
00178 
00179 }
00180 
00181 }
00182       
00183 #endif

Generated on Tue Aug 9 14:35:11 2005 for simtheticlib by  doxygen 1.4.1