rssoft  0.0.0
Reed-Solomon codes library with soft decision decoding
/shared/development/google_code/rssoft/library/lib/GSKV_Interpolation.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 RSSoft. A Reed-Solomon 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  Guruswami-Sudan-Koetter-Vardy interpolation class for soft decision
00021  decoding
00022 
00023  */
00024 #ifndef __GSKV_INTERPOLATION_H__
00025 #define __GSKV_INTERPOLATION_H__
00026 
00027 #include "GFq_BivariatePolynomial.h"
00028 #include "GFq_Element.h"
00029 #include <utility>
00030 #include <vector>
00031 
00032 namespace rssoft
00033 {
00034 
00035 namespace gf
00036 {
00037 class GFq;
00038 }
00039 
00040 class MultiplicityMatrix;
00041 class EvaluationValues;
00042 
00043 class GSKV_Interpolation
00044 {
00045 public:
00052         GSKV_Interpolation(const gf::GFq& _gf, unsigned int _k, const EvaluationValues& _evaluation_values);
00053 
00057         ~GSKV_Interpolation();
00058     
00062     const EvaluationValues& get_evaluation_values() const
00063     {
00064         return evaluation_values;
00065     }
00066 
00071     void set_verbosity(unsigned int _verbosity)
00072     {
00073         verbosity = _verbosity;
00074     }
00075     
00076     unsigned int get_dX() const
00077     {
00078         return dX;
00079     }
00080 
00081     unsigned int get_dY() const
00082     {
00083         return dY;
00084     }
00085 
00090         const gf::GFq_BivariatePolynomial& run(const MultiplicityMatrix& mmat);
00091 
00092 protected:
00097         std::pair<unsigned int, unsigned int> maximum_degrees(const MultiplicityMatrix& mmat);
00098 
00102         void init_G(unsigned int dY);
00103 
00110         void process_point(unsigned int iX, unsigned int iY, unsigned int multiplicity);
00111 
00119         void process_hasse(const gf::GFq_Element& x, const gf::GFq_Element& y, unsigned int mu, unsigned int nu);
00120 
00125         const gf::GFq_BivariatePolynomial& final_G();
00126 
00127         // fixed parameters
00128         const gf::GFq& gf; 
00129         unsigned int k; 
00130         const EvaluationValues& evaluation_values; 
00131     unsigned int verbosity; 
00132 
00133         // parameters changing at each process run
00134     unsigned int dX;
00135     unsigned int dY;
00136     unsigned int mcost; 
00137         std::vector<gf::GFq_BivariatePolynomial> G; 
00138         std::vector<bool> calcG; 
00139         std::vector<unsigned int> lodG; 
00140     unsigned int it_number; 
00141     unsigned int Cm; 
00142     unsigned int final_ig; 
00143 };
00144 
00145 } // namespace rssoft
00146 
00147 #endif // __GSKV_INTERPOLATION_H__
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines