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

viterbi.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           viterbi.h  -  description
00003                              -------------------
00004     begin                : Die Mai 21 2002
00005     copyright            : (C) 2002 by Peter Haase
00006     email                : mail@p-haase.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 VITERBI_HEADER
00029 #define VITERBI_HEADER
00030 
00031 #include <iostream>
00032 #include <iomanip>
00033 #include <complex>
00034 #include <stdexcept>
00035 #include <algorithm>
00036 #include <memory>
00037 
00038 
00039 //#include "ofdmlimits.h"
00040 #include "signals.h"
00041 #include "misc.h"
00042 #include "phbib.h"
00043 #include "trellisdecoding.h"
00044 
00045 
00046 namespace simthlib{
00047 
00048 class Viterbi : public TrellisDecodingAlgorithm
00049 {
00050 
00051   public:
00052 
00055     Viterbi(std::auto_ptr<Trellis> usedTrellis);
00056 
00059     virtual ~Viterbi();
00060 
00063     void decode(const simth::LlvSeq &metr, simth::BitSeq* bs, const simth::LlrSeq* apri = NULL);
00064 
00065     virtual void print(std::ostream &os) const;
00066 
00067     void printStateDiagram(std::ostream &os) const;
00068 
00069   private:
00070 
00073     virtual void Forward(const simth::LlvSeq &symllv, const simth::LlrSeq* apri = NULL);
00074 
00077     virtual void Backward(simth::BitSeq* bs);
00078 
00079     void invariante() const;
00080 
00082     double *metric;
00083 
00085     double *new_metric;
00086 
00088     std::vector<std::vector<TrellisPath> > paths;
00089 
00090 
00091 
00092 };
00093 
00094 
00095 
00096 inline void Viterbi::invariante() const
00097 {
00098   if(DEBUG){
00099   }
00100 }
00101 
00102 
00103 
00104 }
00105 
00106 #endif

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