1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
---|
2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
---|
3 | <title>mixpp: reedsolomon.h Source File</title> |
---|
4 | <link href="tabs.css" rel="stylesheet" type="text/css"> |
---|
5 | <link href="doxygen.css" rel="stylesheet" type="text/css"> |
---|
6 | </head><body> |
---|
7 | <!-- Generated by Doxygen 1.5.8 --> |
---|
8 | <script type="text/javascript"> |
---|
9 | <!-- |
---|
10 | function changeDisplayState (e){ |
---|
11 | var num=this.id.replace(/[^[0-9]/g,''); |
---|
12 | var button=this.firstChild; |
---|
13 | var sectionDiv=document.getElementById('dynsection'+num); |
---|
14 | if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){ |
---|
15 | sectionDiv.style.display='block'; |
---|
16 | button.src='open.gif'; |
---|
17 | }else{ |
---|
18 | sectionDiv.style.display='none'; |
---|
19 | button.src='closed.gif'; |
---|
20 | } |
---|
21 | } |
---|
22 | function initDynSections(){ |
---|
23 | var divs=document.getElementsByTagName('div'); |
---|
24 | var sectionCounter=1; |
---|
25 | for(var i=0;i<divs.length-1;i++){ |
---|
26 | if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){ |
---|
27 | var header=divs[i]; |
---|
28 | var section=divs[i+1]; |
---|
29 | var button=header.firstChild; |
---|
30 | if (button!='IMG'){ |
---|
31 | divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild); |
---|
32 | button=document.createElement('img'); |
---|
33 | divs[i].insertBefore(button,divs[i].firstChild); |
---|
34 | } |
---|
35 | header.style.cursor='pointer'; |
---|
36 | header.onclick=changeDisplayState; |
---|
37 | header.id='dynheader'+sectionCounter; |
---|
38 | button.src='closed.gif'; |
---|
39 | section.id='dynsection'+sectionCounter; |
---|
40 | section.style.display='none'; |
---|
41 | section.style.marginLeft='14px'; |
---|
42 | sectionCounter++; |
---|
43 | } |
---|
44 | } |
---|
45 | } |
---|
46 | window.onload = initDynSections; |
---|
47 | --> |
---|
48 | </script> |
---|
49 | <div class="navigation" id="top"> |
---|
50 | <div class="tabs"> |
---|
51 | <ul> |
---|
52 | <li><a href="main.html"><span>Main Page</span></a></li> |
---|
53 | <li><a href="pages.html"><span>Related Pages</span></a></li> |
---|
54 | <li><a href="modules.html"><span>Modules</span></a></li> |
---|
55 | <li><a href="annotated.html"><span>Classes</span></a></li> |
---|
56 | <li class="current"><a href="files.html"><span>Files</span></a></li> |
---|
57 | </ul> |
---|
58 | </div> |
---|
59 | <div class="tabs"> |
---|
60 | <ul> |
---|
61 | <li><a href="files.html"><span>File List</span></a></li> |
---|
62 | <li><a href="globals.html"><span>File Members</span></a></li> |
---|
63 | </ul> |
---|
64 | </div> |
---|
65 | <h1>reedsolomon.h</h1><a href="reedsolomon_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 |
---|
66 | <a name="l00029"></a>00029 <span class="preprocessor">#ifndef REEDSOLOMON_H</span> |
---|
67 | <a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define REEDSOLOMON_H</span> |
---|
68 | <a name="l00031"></a>00031 <span class="preprocessor"></span> |
---|
69 | <a name="l00032"></a>00032 <span class="preprocessor">#include <<a class="code" href="vec_8h.html" title="Templated Vector Class Definitions.">itpp/base/vec.h</a>></span> |
---|
70 | <a name="l00033"></a>00033 <span class="preprocessor">#include <<a class="code" href="galois_8h.html" title="Definitions of Galois Field algebra classes and functions.">itpp/comm/galois.h</a>></span> |
---|
71 | <a name="l00034"></a>00034 <span class="preprocessor">#include <<a class="code" href="channel__code_8h.html" title="Channel Code class virtual interface.">itpp/comm/channel_code.h</a>></span> |
---|
72 | <a name="l00035"></a>00035 |
---|
73 | <a name="l00036"></a>00036 |
---|
74 | <a name="l00037"></a>00037 <span class="keyword">namespace </span>itpp |
---|
75 | <a name="l00038"></a>00038 { |
---|
76 | <a name="l00039"></a>00039 |
---|
77 | <a name="l00040"></a>00040 <span class="comment">//---------------------- Reed-Solomon --------------------------------------</span> |
---|
78 | <a name="l00041"></a>00041 |
---|
79 | <a name="l00051"></a><a class="code" href="classitpp_1_1Reed__Solomon.html">00051</a> <span class="keyword">class </span><a class="code" href="classitpp_1_1Reed__Solomon.html" title="Reed-Solomon Codes.">Reed_Solomon</a> : <span class="keyword">public</span> <a class="code" href="classitpp_1_1Channel__Code.html" title="Generic Channel Code class.">Channel_Code</a> |
---|
80 | <a name="l00052"></a>00052 { |
---|
81 | <a name="l00053"></a>00053 <span class="keyword">public</span>: |
---|
82 | <a name="l00055"></a>00055 <a class="code" href="classitpp_1_1Reed__Solomon.html#569487f380264de769c5fe142c8b12ad" title="Class constructor for the - ary, error correcting RS-code.">Reed_Solomon</a>(<span class="keywordtype">int</span> in_m, <span class="keywordtype">int</span> in_t, <span class="keywordtype">bool</span> sys = <span class="keyword">false</span>); |
---|
83 | <a name="l00057"></a><a class="code" href="classitpp_1_1Reed__Solomon.html#dc6a799775767f0c4486399335d3484f">00057</a> <span class="keyword">virtual</span> <a class="code" href="classitpp_1_1Reed__Solomon.html#dc6a799775767f0c4486399335d3484f" title="Destructor.">~Reed_Solomon</a>() { } |
---|
84 | <a name="l00058"></a>00058 |
---|
85 | <a name="l00060"></a>00060 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Reed__Solomon.html#24719bb3f2e49213b5f7ff67ac126a22" title="Encoder function.">encode</a>(<span class="keyword">const</span> bvec &uncoded_bits, bvec &coded_bits); |
---|
86 | <a name="l00062"></a>00062 <span class="keyword">virtual</span> bvec <a class="code" href="classitpp_1_1Reed__Solomon.html#24719bb3f2e49213b5f7ff67ac126a22" title="Encoder function.">encode</a>(<span class="keyword">const</span> bvec &uncoded_bits); |
---|
87 | <a name="l00063"></a>00063 |
---|
88 | <a name="l00065"></a>00065 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Reed__Solomon.html#7d081de5dc6c44daf3b1b83317ea5b10" title="Decoder function.">decode</a>(<span class="keyword">const</span> bvec &coded_bits, bvec &decoded_bits); |
---|
89 | <a name="l00067"></a>00067 <span class="keyword">virtual</span> bvec <a class="code" href="classitpp_1_1Reed__Solomon.html#7d081de5dc6c44daf3b1b83317ea5b10" title="Decoder function.">decode</a>(<span class="keyword">const</span> bvec &coded_bits); |
---|
90 | <a name="l00068"></a>00068 |
---|
91 | <a name="l00069"></a>00069 <span class="comment">// Soft-decision decoding is not implemented</span> |
---|
92 | <a name="l00070"></a>00070 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Reed__Solomon.html#7d081de5dc6c44daf3b1b83317ea5b10" title="Decoder function.">decode</a>(<span class="keyword">const</span> vec &received_signal, bvec &output); |
---|
93 | <a name="l00071"></a>00071 <span class="keyword">virtual</span> bvec <a class="code" href="classitpp_1_1Reed__Solomon.html#7d081de5dc6c44daf3b1b83317ea5b10" title="Decoder function.">decode</a>(<span class="keyword">const</span> vec &received_signal); |
---|
94 | <a name="l00072"></a>00072 |
---|
95 | <a name="l00074"></a><a class="code" href="classitpp_1_1Reed__Solomon.html#206fd6f9d9516760c2840a504bc24b54">00074</a> <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classitpp_1_1Reed__Solomon.html#206fd6f9d9516760c2840a504bc24b54" title="Gets the rate of the RS-code.">get_rate</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">static_cast<</span><span class="keywordtype">double</span><span class="keyword">></span>(k) / n; } |
---|
96 | <a name="l00075"></a>00075 |
---|
97 | <a name="l00077"></a><a class="code" href="classitpp_1_1Reed__Solomon.html#99cfd5a270dcc8502dc099013196e053">00077</a> <a class="code" href="classitpp_1_1Reed__Solomon.html" title="Reed-Solomon Codes.">Reed_Solomon</a> & <a class="code" href="classitpp_1_1Reed__Solomon.html#99cfd5a270dcc8502dc099013196e053" title="Dummy assignment operator - MSVC++ warning C4512.">operator=</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Reed__Solomon.html" title="Reed-Solomon Codes.">Reed_Solomon</a> &) { <span class="keywordflow">return</span> *<span class="keyword">this</span>; } |
---|
98 | <a name="l00078"></a>00078 |
---|
99 | <a name="l00079"></a>00079 <span class="keyword">protected</span>: |
---|
100 | <a name="l00082"></a><a class="code" href="classitpp_1_1Reed__Solomon.html#daa2843f29cad4bc95b72dc8d378b929">00082</a> <span class="keywordtype">int</span> <a class="code" href="classitpp_1_1Reed__Solomon.html#daa2843f29cad4bc95b72dc8d378b929">m</a>, t, k, n, q; |
---|
101 | <a name="l00084"></a>00084 |
---|
102 | <a name="l00085"></a><a class="code" href="classitpp_1_1Reed__Solomon.html#a8ef6f8b2a5206b7d4642b9583f6215a">00085</a> <a class="code" href="classitpp_1_1GFX.html" title="Polynomials over GF(q)[x], where q=2^m, m=1,...,16.">GFX</a> <a class="code" href="classitpp_1_1Reed__Solomon.html#a8ef6f8b2a5206b7d4642b9583f6215a" title="The generator polynomial of the RS code.">g</a>; |
---|
103 | <a name="l00087"></a><a class="code" href="classitpp_1_1Reed__Solomon.html#e4b60e673292a6abb87d0389537bfe0c">00087</a> <span class="keyword">const</span> <span class="keywordtype">bool</span> <a class="code" href="classitpp_1_1Reed__Solomon.html#e4b60e673292a6abb87d0389537bfe0c" title="Whether or not the code is systematic.">systematic</a>; |
---|
104 | <a name="l00088"></a>00088 }; |
---|
105 | <a name="l00089"></a>00089 |
---|
106 | <a name="l00090"></a>00090 } <span class="comment">// namespace itpp</span> |
---|
107 | <a name="l00091"></a>00091 |
---|
108 | <a name="l00092"></a>00092 <span class="preprocessor">#endif // #ifndef REEDSOLOMON_H</span> |
---|
109 | </pre></div></div> |
---|
110 | <hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:02:12 2009 for mixpp by |
---|
111 | <a href="http://www.doxygen.org/index.html"> |
---|
112 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> |
---|
113 | </body> |
---|
114 | </html> |
---|