root/doc/html/classitpp_1_1BCH.html @ 354

Revision 353, 15.1 kB (checked in by smidl, 16 years ago)

doc

Line 
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: itpp::BCH Class Reference</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<!--
10function 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}
22function 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}
46window.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&nbsp;Page</span></a></li>
53      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
54      <li><a href="modules.html"><span>Modules</span></a></li>
55      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
56      <li><a href="files.html"><span>Files</span></a></li>
57    </ul>
58  </div>
59  <div class="tabs">
60    <ul>
61      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
62      <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
63      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
64      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
65    </ul>
66  </div>
67  <div class="navpath"><b>itpp</b>::<a class="el" href="classitpp_1_1BCH.html">BCH</a>
68  </div>
69</div>
70<div class="contents">
71<h1>itpp::BCH Class Reference<br>
72<small>
73[<a class="el" href="group__fec.html">Forward Error Correcting Codes</a>]</small>
74</h1><!-- doxytag: class="itpp::BCH" --><!-- doxytag: inherits="itpp::Channel_Code" -->Class for binary, narrow-sense <a class="el" href="classitpp_1_1BCH.html" title="Class for binary, narrow-sense BCH codes.">BCH</a> codes. 
75<a href="#_details">More...</a>
76<p>
77<code>#include &lt;<a class="el" href="bch_8h-source.html">bch.h</a>&gt;</code>
78<p>
79
80<p>
81<a href="classitpp_1_1BCH-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
82<tr><td></td></tr>
83<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
84<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1BCH.html#b14976a274da9579b652f3ac6aa1c9a0">BCH</a> (int in_n, int in_k, int in_t, const ivec &amp;genpolynom, bool sys=false)</td></tr>
85
86<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialize a (n,k)-code that can correct t errors.  <a href="#b14976a274da9579b652f3ac6aa1c9a0"></a><br></td></tr>
87<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1BCH.html#cec39b7286709952ed6f074e4eb6bd7a">BCH</a> (int in_n, int in_t, bool sys=false)</td></tr>
88
89<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialize a (n,k)-code that can correct t errors.  <a href="#cec39b7286709952ed6f074e4eb6bd7a"></a><br></td></tr>
90<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c2d5fcdd62fba4073d506abe31c480cd"></a><!-- doxytag: member="itpp::BCH::~BCH" ref="c2d5fcdd62fba4073d506abe31c480cd" args="()" -->
91virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1BCH.html#c2d5fcdd62fba4073d506abe31c480cd">~BCH</a> ()</td></tr>
92
93<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor. <br></td></tr>
94<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d4afca904108624cff06356b084ed0d0"></a><!-- doxytag: member="itpp::BCH::encode" ref="d4afca904108624cff06356b084ed0d0" args="(const bvec &amp;uncoded_bits, bvec &amp;coded_bits)" -->
95virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1BCH.html#d4afca904108624cff06356b084ed0d0">encode</a> (const bvec &amp;uncoded_bits, bvec &amp;coded_bits)</td></tr>
96
97<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Encode a bvec of indata. <br></td></tr>
98<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5f371eef585940bbca6c963ddbbda6dd"></a><!-- doxytag: member="itpp::BCH::encode" ref="5f371eef585940bbca6c963ddbbda6dd" args="(const bvec &amp;uncoded_bits)" -->
99virtual bvec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1BCH.html#5f371eef585940bbca6c963ddbbda6dd">encode</a> (const bvec &amp;uncoded_bits)</td></tr>
100
101<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Encode a bvec of indata. <br></td></tr>
102<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4bd690a4d1751a153c7be314b56e8fc5"></a><!-- doxytag: member="itpp::BCH::decode" ref="4bd690a4d1751a153c7be314b56e8fc5" args="(const bvec &amp;coded_bits, bvec &amp;decoded_bits)" -->
103virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1BCH.html#4bd690a4d1751a153c7be314b56e8fc5">decode</a> (const bvec &amp;coded_bits, bvec &amp;decoded_bits)</td></tr>
104
105<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Decode a bvec of coded data. <br></td></tr>
106<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="98738e6bb7e6283b13e224e09c92d781"></a><!-- doxytag: member="itpp::BCH::decode" ref="98738e6bb7e6283b13e224e09c92d781" args="(const bvec &amp;coded_bits)" -->
107virtual bvec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1BCH.html#98738e6bb7e6283b13e224e09c92d781">decode</a> (const bvec &amp;coded_bits)</td></tr>
108
109<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Decode a bvec of coded data. <br></td></tr>
110<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9cded457c757bdab2c078892e0254641"></a><!-- doxytag: member="itpp::BCH::decode" ref="9cded457c757bdab2c078892e0254641" args="(const vec &amp;received_signal, bvec &amp;output)" -->
111virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1BCH.html#9cded457c757bdab2c078892e0254641">decode</a> (const vec &amp;received_signal, bvec &amp;output)</td></tr>
112
113<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Decode a vec of received data. <br></td></tr>
114<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9adca6b209636ad8a54c8bf59ac30642"></a><!-- doxytag: member="itpp::BCH::decode" ref="9adca6b209636ad8a54c8bf59ac30642" args="(const vec &amp;received_signal)" -->
115virtual bvec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1BCH.html#9adca6b209636ad8a54c8bf59ac30642">decode</a> (const vec &amp;received_signal)</td></tr>
116
117<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Decode a vec of received data. <br></td></tr>
118<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d3657677fbec25d3b69c6cca880371de"></a><!-- doxytag: member="itpp::BCH::get_rate" ref="d3657677fbec25d3b69c6cca880371de" args="() const " -->
119virtual double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1BCH.html#d3657677fbec25d3b69c6cca880371de">get_rate</a> () const </td></tr>
120
121<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the code rate. <br></td></tr>
122<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b881817c1fc0d43c5c4f04c1185bcd5f"></a><!-- doxytag: member="itpp::BCH::get_k" ref="b881817c1fc0d43c5c4f04c1185bcd5f" args="() const " -->
123virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1BCH.html#b881817c1fc0d43c5c4f04c1185bcd5f">get_k</a> () const </td></tr>
124
125<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get cardinality of code k. <br></td></tr>
126<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4583f345d7bca5ea8fb58ca78dc5519c"></a><!-- doxytag: member="itpp::BCH::operator=" ref="4583f345d7bca5ea8fb58ca78dc5519c" args="(const BCH &amp;)" -->
127<a class="el" href="classitpp_1_1BCH.html">BCH</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1BCH.html#4583f345d7bca5ea8fb58ca78dc5519c">operator=</a> (const <a class="el" href="classitpp_1_1BCH.html">BCH</a> &amp;)</td></tr>
128
129<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Dummy assignment operator - MSVC++ warning C4512. <br></td></tr>
130</table>
131<hr><a name="_details"></a><h2>Detailed Description</h2>
132Class for binary, narrow-sense <a class="el" href="classitpp_1_1BCH.html" title="Class for binary, narrow-sense BCH codes.">BCH</a> codes.
133<p>
134The notation used is found in S. B. Wicker, "Error control systems for digital communication and storage", Appendix E, Prentice-Hall, 1995.<p>
135Example: <div class="fragment"><pre class="fragment"> <a class="code" href="classitpp_1_1BCH.html#b14976a274da9579b652f3ac6aa1c9a0" title="Initialize a (n,k)-code that can correct t errors.">BCH</a> bch(31,21,2,ivec(<span class="stringliteral">"3 5 5 1"</span>))
136</pre></div> uses the generator polynomial <img class="formulaInl" alt="$g(x) = x^{10} + x^9 + x^8 + x^6 + x^5 + x^3 + 1$" src="form_188.png">, and is capable of correcting 2 errors with <em>n</em> = 31 and <em>k</em> = 21. <hr><h2>Constructor &amp; Destructor Documentation</h2>
137<a class="anchor" name="b14976a274da9579b652f3ac6aa1c9a0"></a><!-- doxytag: member="itpp::BCH::BCH" ref="b14976a274da9579b652f3ac6aa1c9a0" args="(int in_n, int in_k, int in_t, const ivec &amp;genpolynom, bool sys=false)" -->
138<div class="memitem">
139<div class="memproto">
140      <table class="memname">
141        <tr>
142          <td class="memname">itpp::BCH::BCH           </td>
143          <td>(</td>
144          <td class="paramtype">int&nbsp;</td>
145          <td class="paramname"> <em>in_n</em>, </td>
146        </tr>
147        <tr>
148          <td class="paramkey"></td>
149          <td></td>
150          <td class="paramtype">int&nbsp;</td>
151          <td class="paramname"> <em>in_k</em>, </td>
152        </tr>
153        <tr>
154          <td class="paramkey"></td>
155          <td></td>
156          <td class="paramtype">int&nbsp;</td>
157          <td class="paramname"> <em>in_t</em>, </td>
158        </tr>
159        <tr>
160          <td class="paramkey"></td>
161          <td></td>
162          <td class="paramtype">const ivec &amp;&nbsp;</td>
163          <td class="paramname"> <em>genpolynom</em>, </td>
164        </tr>
165        <tr>
166          <td class="paramkey"></td>
167          <td></td>
168          <td class="paramtype">bool&nbsp;</td>
169          <td class="paramname"> <em>sys</em> = <code>false</code></td><td>&nbsp;</td>
170        </tr>
171        <tr>
172          <td></td>
173          <td>)</td>
174          <td></td><td></td><td></td>
175        </tr>
176      </table>
177</div>
178<div class="memdoc">
179
180<p>
181Initialize a (n,k)-code that can correct t errors.
182<p>
183<dl class="note" compact><dt><b>Note:</b></dt><dd>Do not call this constructor with e.g. <a class="el" href="classitpp_1_1BCH.html" title="Class for binary, narrow-sense BCH codes.">BCH</a> bch(31, 21, 2, "3 5 5 1") but with <a class="el" href="classitpp_1_1BCH.html" title="Class for binary, narrow-sense BCH codes.">BCH</a> bch(31, 21, 2, ivec("3 5 5 1")) instead. Otherwise the complier will complain. </dd></dl>
184
185<p>References <a class="el" href="group__convertfunc.html#g587a6022d35b3545e049374daa3186e5">itpp::oct2bin()</a>, <a class="el" href="galois_8h-source.html#l00395">itpp::GFX::set()</a>, and <a class="el" href="group__specmat.html#g9df9aa3553b6a5c07924954b85466cec">itpp::zeros_i()</a>.</p>
186
187</div>
188</div><p>
189<a class="anchor" name="cec39b7286709952ed6f074e4eb6bd7a"></a><!-- doxytag: member="itpp::BCH::BCH" ref="cec39b7286709952ed6f074e4eb6bd7a" args="(int in_n, int in_t, bool sys=false)" -->
190<div class="memitem">
191<div class="memproto">
192      <table class="memname">
193        <tr>
194          <td class="memname">itpp::BCH::BCH           </td>
195          <td>(</td>
196          <td class="paramtype">int&nbsp;</td>
197          <td class="paramname"> <em>in_n</em>, </td>
198        </tr>
199        <tr>
200          <td class="paramkey"></td>
201          <td></td>
202          <td class="paramtype">int&nbsp;</td>
203          <td class="paramname"> <em>in_t</em>, </td>
204        </tr>
205        <tr>
206          <td class="paramkey"></td>
207          <td></td>
208          <td class="paramtype">bool&nbsp;</td>
209          <td class="paramname"> <em>sys</em> = <code>false</code></td><td>&nbsp;</td>
210        </tr>
211        <tr>
212          <td></td>
213          <td>)</td>
214          <td></td><td></td><td></td>
215        </tr>
216      </table>
217</div>
218<div class="memdoc">
219
220<p>
221Initialize a (n,k)-code that can correct t errors.
222<p>
223<dl class="author" compact><dt><b>Author:</b></dt><dd>Stephan Ludwig</dd></dl>
224The generator polynomial is automatically generated from the (n, t) parameters of the <a class="el" href="classitpp_1_1BCH.html" title="Class for binary, narrow-sense BCH codes.">BCH</a> code. The constructor generates the generator polynomial (and determines k) according to the method described in:<p>
225[Wic95] S. B. Wicker, "Error control systems for digital communication and storage", Prentice-Hall, 1995
226<p>References <a class="el" href="galois_8h-source.html#l00453">itpp::GFX::get_true_degree()</a>, <a class="el" href="log__exp_8h-source.html#l00297">itpp::int2bits()</a>, <a class="el" href="itassert_8h-source.html#l00094">it_assert</a>, <a class="el" href="array_8h-source.html#l00157">itpp::Array&lt; T &gt;::length()</a>, <a class="el" href="matfunc_8h-source.html#l00051">itpp::length()</a>, <a class="el" href="galois_8h-source.html#l00395">itpp::GFX::set()</a>, <a class="el" href="array_8h-source.html#l00257">itpp::Array&lt; T &gt;::set_size()</a>, and <a class="el" href="group__specmat.html#g9df9aa3553b6a5c07924954b85466cec">itpp::zeros_i()</a>.</p>
227
228</div>
229</div><p>
230<hr>The documentation for this class was generated from the following files:<ul>
231<li><a class="el" href="bch_8h-source.html">bch.h</a><li><a class="el" href="bch_8cpp.html">bch.cpp</a></ul>
232</div>
233<hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:02:19 2009 for mixpp by&nbsp;
234<a href="http://www.doxygen.org/index.html">
235<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
236</body>
237</html>
Note: See TracBrowser for help on using the browser.