rssoft  0.0.0
Reed-Solomon codes library with soft decision decoding
/shared/development/google_code/rssoft/library/lib/GF_Utils.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  Utility routines not linked to a patricular GF entity
00021 
00022  */
00023 
00024 #ifndef __GF_UTILS_H__
00025 #define __GF_UTILS_H__
00026 
00027 #include "GFq.h"
00028 #include "GFq_Element.h"
00029 #include <set>
00030 
00031 namespace rssoft
00032 {
00033 namespace gf
00034 {
00035 
00040 bool binomial_coeff_parity(unsigned int n, unsigned int k);
00041 
00047 unsigned int factorial(unsigned int x, unsigned int result = 1);
00048 
00055 unsigned int binomial_coeff(unsigned int n, unsigned int k);
00056 
00057 void print_symbols_vector(std::ostream& os, const std::vector<GFq_Symbol>& v);
00058 void print_elements_vector(std::ostream& os, const std::vector<GFq_Element>& v);
00059 bool compare_symbol_vectors(const std::vector<GFq_Symbol>& v1, const std::vector<GFq_Symbol>& v2);
00060 void print_symbols_and_erasures(std::ostream& os, const std::vector<GFq_Symbol>& v, std::set<unsigned int>& erasure_indexes);
00061 
00062 } // namespace gf
00063 } // namespace rssoft
00064 
00065 #endif // __GF_UTILS_H__
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines