IT++ Logo
reedsolomon.h
Go to the documentation of this file.
1
29#ifndef REEDSOLOMON_H
30#define REEDSOLOMON_H
31
32#include <itpp/base/vec.h>
33#include <itpp/comm/galois.h>
35#include <itpp/itexports.h>
36
37namespace itpp
38{
39
40//---------------------- Reed-Solomon --------------------------------------
41
51class ITPP_EXPORT Reed_Solomon : public Channel_Code
52{
53public:
58 Reed_Solomon(int in_m, int in_t, bool sys = false, int in_b = 1);
60 virtual ~Reed_Solomon() { }
61
63 virtual void encode(const bvec &uncoded_bits, bvec &coded_bits);
65 virtual bvec encode(const bvec &uncoded_bits);
66
82 virtual bool decode(const bvec &coded_bits, const ivec &erasure_positions, bvec &decoded_message, bvec &cw_isvalid);
83
95 virtual bool decode(const bvec &coded_bits, bvec &decoded_message, bvec &cw_isvalid);
96
98 virtual void decode(const bvec &coded_bits, bvec &decoded_bits);
100 virtual bvec decode(const bvec &coded_bits);
101
102 // Soft-decision decoding is not implemented
103 virtual void decode(const vec &received_signal, bvec &output);
104 virtual bvec decode(const vec &received_signal);
105
107 virtual double get_rate() const { return static_cast<double>(k) / n; }
108
110 Reed_Solomon & operator=(const Reed_Solomon &) { return *this; }
111
112protected:
115 int m, t, k, n, q, b;
120 const bool systematic;
121};
122
123} // namespace itpp
124
125#endif // #ifndef REEDSOLOMON_H
Channel Code class virtual interface.
Generic Channel Code class.
Polynomials over GF(q)[x], where q=2^m, m=1,...,16.
Definition galois.h:176
Reed-Solomon Codes.
Definition reedsolomon.h:52
GFX g
The generator polynomial of the RS code.
virtual double get_rate() const
Gets the rate of the RS-code.
Reed_Solomon & operator=(const Reed_Solomon &)
Dummy assignment operator - MSVC++ warning C4512.
virtual ~Reed_Solomon()
Destructor.
Definition reedsolomon.h:60
const bool systematic
Whether or not the code is systematic.
Definitions of Galois Field algebra classes and functions.
itpp namespace
Definition itmex.h:37
Templated Vector Class Definitions.
SourceForge Logo

Generated on Tue Dec 10 2024 04:49:37 for IT++ by Doxygen 1.12.0