IT++
4.3.1
Toggle main menu visibility
itpp
comm
reedsolomon.h
Go to the documentation of this file.
1
28
29
#ifndef REEDSOLOMON_H
30
#define REEDSOLOMON_H
31
32
#include <
itpp/base/vec.h
>
33
#include <
itpp/comm/galois.h
>
34
#include <
itpp/comm/channel_code.h
>
35
#include <itpp/itexports.h>
36
37
namespace
itpp
38
{
39
40
//---------------------- Reed-Solomon --------------------------------------
41
51
class
ITPP_EXPORT
Reed_Solomon
:
public
Channel_Code
52
{
53
public
:
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
112
protected
:
115
int
m
,
t
,
k
,
n
,
q
,
b
;
118
GFX
g
;
120
const
bool
systematic
;
121
};
122
123
}
// namespace itpp
124
125
#endif
// #ifndef REEDSOLOMON_H
channel_code.h
Channel Code class virtual interface.
itpp::Channel_Code::Channel_Code
Channel_Code()
Default constructor.
Definition
channel_code.h:54
itpp::GFX
Polynomials over GF(q)[x], where q=2^m, m=1,...,16.
Definition
galois.h:176
itpp::Reed_Solomon::t
int t
Definition
reedsolomon.h:115
itpp::Reed_Solomon::n
int n
Definition
reedsolomon.h:115
itpp::Reed_Solomon::b
int b
Definition
reedsolomon.h:115
itpp::Reed_Solomon::Reed_Solomon
Reed_Solomon(int in_m, int in_t, bool sys=false, int in_b=1)
Definition
reedsolomon.cpp:55
itpp::Reed_Solomon::q
int q
Definition
reedsolomon.h:115
itpp::Reed_Solomon::g
GFX g
The generator polynomial of the RS code.
Definition
reedsolomon.h:118
itpp::Reed_Solomon::get_rate
virtual double get_rate() const
Gets the rate of the RS-code.
Definition
reedsolomon.h:107
itpp::Reed_Solomon::operator=
Reed_Solomon & operator=(const Reed_Solomon &)
Dummy assignment operator - MSVC++ warning C4512.
Definition
reedsolomon.h:110
itpp::Reed_Solomon::k
int k
Definition
reedsolomon.h:115
itpp::Reed_Solomon::m
int m
Definition
reedsolomon.h:115
itpp::Reed_Solomon::~Reed_Solomon
virtual ~Reed_Solomon()
Destructor.
Definition
reedsolomon.h:60
itpp::Reed_Solomon::systematic
const bool systematic
Whether or not the code is systematic.
Definition
reedsolomon.h:120
galois.h
Definitions of Galois Field algebra classes and functions.
itpp
itpp namespace
Definition
itmex.h:37
vec.h
Templated Vector Class Definitions.
Generated by
1.17.0