root/doc/html/classitpp_1_1Rec__Syst__Conv__Code.html @ 353

Revision 353, 36.9 kB (checked in by smidl, 15 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::Rec_Syst_Conv_Code 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_1Rec__Syst__Conv__Code.html">Rec_Syst_Conv_Code</a>
68  </div>
69</div>
70<div class="contents">
71<h1>itpp::Rec_Syst_Conv_Code Class Reference<br>
72<small>
73[<a class="el" href="group__fec.html">Forward Error Correcting Codes</a>]</small>
74</h1><!-- doxytag: class="itpp::Rec_Syst_Conv_Code" -->A Recursive Systematic Convolutional Encoder/Decoder class. 
75<a href="#_details">More...</a>
76<p>
77<code>#include &lt;<a class="el" href="rec__syst__conv__code_8h-source.html">rec_syst_conv_code.h</a>&gt;</code>
78<p>
79
80<p>
81<a href="classitpp_1_1Rec__Syst__Conv__Code-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"><a class="anchor" name="78533fa058871b0389072e25c5e87fb9"></a><!-- doxytag: member="itpp::Rec_Syst_Conv_Code::Rec_Syst_Conv_Code" ref="78533fa058871b0389072e25c5e87fb9" args="()" -->
85&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Rec__Syst__Conv__Code.html#78533fa058871b0389072e25c5e87fb9">Rec_Syst_Conv_Code</a> ()</td></tr>
86
87<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Class constructor. <br></td></tr>
88<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="22a6014339d8b5c920eac189e868c11c"></a><!-- doxytag: member="itpp::Rec_Syst_Conv_Code::~Rec_Syst_Conv_Code" ref="22a6014339d8b5c920eac189e868c11c" args="()" -->
89virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Rec__Syst__Conv__Code.html#22a6014339d8b5c920eac189e868c11c">~Rec_Syst_Conv_Code</a> ()</td></tr>
90
91<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Class constructor. <br></td></tr>
92<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Rec__Syst__Conv__Code.html#13d3ee61d778b62f3c2c259dfe4a71d3">set_generator_polynomials</a> (const ivec &amp;gen, int constraint_length)</td></tr>
93
94<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set generator polynomials.  <a href="#13d3ee61d778b62f3c2c259dfe4a71d3"></a><br></td></tr>
95<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Rec__Syst__Conv__Code.html#d185b255dcc178cc3933ae430ce0620d">set_awgn_channel_parameters</a> (double Ec, double N0)</td></tr>
96
97<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the channel parameters needed for MAP-decoding.  <a href="#d185b255dcc178cc3933ae430ce0620d"></a><br></td></tr>
98<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Rec__Syst__Conv__Code.html#f1e3fba48b14c660a56f168e2e878aa2">set_scaling_factor</a> (double in_Lc)</td></tr>
99
100<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set scaling factor for the decoder.  <a href="#f1e3fba48b14c660a56f168e2e878aa2"></a><br></td></tr>
101<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ca7a39ac196545676826c1a16eab8026"></a><!-- doxytag: member="itpp::Rec_Syst_Conv_Code::set_llrcalc" ref="ca7a39ac196545676826c1a16eab8026" args="(LLR_calc_unit in_llrcalc)" -->
102void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Rec__Syst__Conv__Code.html#ca7a39ac196545676826c1a16eab8026">set_llrcalc</a> (<a class="el" href="classitpp_1_1LLR__calc__unit.html">LLR_calc_unit</a> in_llrcalc)</td></tr>
103
104<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the lookup table for algebra with quantized LLR values (see <code><a class="el" href="classitpp_1_1LLR__calc__unit.html" title="Log-likelihood algebra calculation unit.">LLR_calc_unit</a></code> class). <br></td></tr>
105<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Rec__Syst__Conv__Code.html#472b5db0388ab3670860f942a756f92b">encode_tail</a> (const bvec &amp;input, bvec &amp;tail, <a class="el" href="mat_8h.html#f90acd1af41bf2d1d8a4bb23662fff69">bmat</a> &amp;parity_bits)</td></tr>
106
107<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Encode a binary vector of inputs and also adds a tail of <em>K-1</em> zeros to force the encoder into the zero state.  <a href="#472b5db0388ab3670860f942a756f92b"></a><br></td></tr>
108<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2c0878dc5b23f28baa52ac56f55db444"></a><!-- doxytag: member="itpp::Rec_Syst_Conv_Code::encode" ref="2c0878dc5b23f28baa52ac56f55db444" args="(const bvec &amp;input, bmat &amp;parity_bits)" -->
109void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Rec__Syst__Conv__Code.html#2c0878dc5b23f28baa52ac56f55db444">encode</a> (const bvec &amp;input, <a class="el" href="mat_8h.html#f90acd1af41bf2d1d8a4bb23662fff69">bmat</a> &amp;parity_bits)</td></tr>
110
111<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Encode a binary vector of inputs starting from zero state without adding of a tail. <br></td></tr>
112<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Rec__Syst__Conv__Code.html#12c825eac22df94cbc1c5b7518dea14d">map_decode</a> (const vec &amp;rec_systematic, const mat &amp;rec_parity, const vec &amp;extrinsic_input, vec &amp;extrinsic_output, bool set_terminated=false)</td></tr>
113
114<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Maximum A Posteriori (MAP) Probability symbol-by-symbol decoder.  <a href="#12c825eac22df94cbc1c5b7518dea14d"></a><br></td></tr>
115<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Rec__Syst__Conv__Code.html#f3e37cf8d01e9e79ebfcd93a3e8ebd4c">log_decode</a> (const vec &amp;rec_systematic, const mat &amp;rec_parity, const vec &amp;extrinsic_input, vec &amp;extrinsic_output, bool set_terminated=false, std::string metric=&quot;LOGMAX&quot;)</td></tr>
116
117<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Log domain implementation of the Maximum A Posteriori (MAP) Probability symbol-by-symbol decoder.  <a href="#f3e37cf8d01e9e79ebfcd93a3e8ebd4c"></a><br></td></tr>
118<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Rec__Syst__Conv__Code.html#b39d08e50d99f8fc83296ea8af338fa6">log_decode_n2</a> (const vec &amp;rec_systematic, const vec &amp;rec_parity, const vec &amp;extrinsic_input, vec &amp;extrinsic_output, bool set_terminated=false, std::string metric=&quot;LOGMAX&quot;)</td></tr>
119
120<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Special Log-MAP/Log-MAX decoder implementation for <em>n</em> = 2.  <a href="#b39d08e50d99f8fc83296ea8af338fa6"></a><br></td></tr>
121<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Rec__Syst__Conv__Code.html#964be5e527be8214900336a9fa100cb0">log_decode</a> (const QLLRvec &amp;rec_systematic, const QLLRmat &amp;rec_parity, const QLLRvec &amp;extrinsic_input, QLLRvec &amp;extrinsic_output, bool set_terminated=false)</td></tr>
122
123<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Implementation of the log-map decoder using quantized LLR values (the <code>QLLR</code> type) and table-lookup (using the <code><a class="el" href="classitpp_1_1LLR__calc__unit.html" title="Log-likelihood algebra calculation unit.">LLR_calc_unit</a></code> class).  <a href="#964be5e527be8214900336a9fa100cb0"></a><br></td></tr>
124<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Rec__Syst__Conv__Code.html#740c624c372bc5620c8448d73bbd8c84">log_decode_n2</a> (const QLLRvec &amp;rec_systematic, const QLLRvec &amp;rec_parity, const QLLRvec &amp;extrinsic_input, QLLRvec &amp;extrinsic_output, bool set_terminated=false)</td></tr>
125
126<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Implementation of the log-map decoder for the n=2 case using quantized LLR values (the <code>QLLR</code> type) and table-lookup (using the <code><a class="el" href="classitpp_1_1LLR__calc__unit.html" title="Log-likelihood algebra calculation unit.">LLR_calc_unit</a></code> class).  <a href="#740c624c372bc5620c8448d73bbd8c84"></a><br></td></tr>
127<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7d14d798bc1cedcbff45d15bac054f4a"></a><!-- doxytag: member="itpp::Rec_Syst_Conv_Code::operator=" ref="7d14d798bc1cedcbff45d15bac054f4a" args="(const Rec_Syst_Conv_Code &amp;)" -->
128<a class="el" href="classitpp_1_1Rec__Syst__Conv__Code.html">Rec_Syst_Conv_Code</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Rec__Syst__Conv__Code.html#7d14d798bc1cedcbff45d15bac054f4a">operator=</a> (const <a class="el" href="classitpp_1_1Rec__Syst__Conv__Code.html">Rec_Syst_Conv_Code</a> &amp;)</td></tr>
129
130<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Dummy assignment operator - MSVC++ warning C4512. <br></td></tr>
131</table>
132<hr><a name="_details"></a><h2>Detailed Description</h2>
133A Recursive Systematic Convolutional Encoder/Decoder class.
134<p>
135The main purpose of this class is to be used by the <a class="el" href="classitpp_1_1Turbo__Codec.html" title="Turbo encoder/decoder ClassTo set up the turbo encoder used in e.g. WCDMA the following...">Turbo_Codec</a> class which uses two recursive systematic convolutional encoders. It can however be used as a stand alone class. The map_decode member function implementation follows the paper "A Turbo Code Tutorial" by William E. Ryan, New Mexico State University. This paper was found on the web and is probably unpublished. <hr><h2>Member Function Documentation</h2>
136<a class="anchor" name="472b5db0388ab3670860f942a756f92b"></a><!-- doxytag: member="itpp::Rec_Syst_Conv_Code::encode_tail" ref="472b5db0388ab3670860f942a756f92b" args="(const bvec &amp;input, bvec &amp;tail, bmat &amp;parity_bits)" -->
137<div class="memitem">
138<div class="memproto">
139      <table class="memname">
140        <tr>
141          <td class="memname">void itpp::Rec_Syst_Conv_Code::encode_tail           </td>
142          <td>(</td>
143          <td class="paramtype">const bvec &amp;&nbsp;</td>
144          <td class="paramname"> <em>input</em>, </td>
145        </tr>
146        <tr>
147          <td class="paramkey"></td>
148          <td></td>
149          <td class="paramtype">bvec &amp;&nbsp;</td>
150          <td class="paramname"> <em>tail</em>, </td>
151        </tr>
152        <tr>
153          <td class="paramkey"></td>
154          <td></td>
155          <td class="paramtype"><a class="el" href="mat_8h.html#f90acd1af41bf2d1d8a4bb23662fff69">bmat</a> &amp;&nbsp;</td>
156          <td class="paramname"> <em>parity_bits</em></td><td>&nbsp;</td>
157        </tr>
158        <tr>
159          <td></td>
160          <td>)</td>
161          <td></td><td></td><td></td>
162        </tr>
163      </table>
164</div>
165<div class="memdoc">
166
167<p>
168Encode a binary vector of inputs and also adds a tail of <em>K-1</em> zeros to force the encoder into the zero state.
169<p>
170The encoder remembers that the trellis is terminated in the zero state at the end of the input block. This is then utilized by the decoder when going through the trellis in the reverse direction. The tailbits used are returned in <em>tail</em>. Parity bits for both the input part and the tail part of the data are returned in the matrix <em>parity</em> bits.
171<p>References <a class="el" href="matfunc_8h-source.html#l00051">itpp::length()</a>.</p>
172
173<p>Referenced by <a class="el" href="turbo_8cpp-source.html#l00306">itpp::Turbo_Codec::encode_block()</a>.</p>
174
175</div>
176</div><p>
177<a class="anchor" name="964be5e527be8214900336a9fa100cb0"></a><!-- doxytag: member="itpp::Rec_Syst_Conv_Code::log_decode" ref="964be5e527be8214900336a9fa100cb0" args="(const QLLRvec &amp;rec_systematic, const QLLRmat &amp;rec_parity, const QLLRvec &amp;extrinsic_input, QLLRvec &amp;extrinsic_output, bool set_terminated=false)" -->
178<div class="memitem">
179<div class="memproto">
180      <table class="memname">
181        <tr>
182          <td class="memname">void itpp::Rec_Syst_Conv_Code::log_decode           </td>
183          <td>(</td>
184          <td class="paramtype">const QLLRvec &amp;&nbsp;</td>
185          <td class="paramname"> <em>rec_systematic</em>, </td>
186        </tr>
187        <tr>
188          <td class="paramkey"></td>
189          <td></td>
190          <td class="paramtype">const QLLRmat &amp;&nbsp;</td>
191          <td class="paramname"> <em>rec_parity</em>, </td>
192        </tr>
193        <tr>
194          <td class="paramkey"></td>
195          <td></td>
196          <td class="paramtype">const QLLRvec &amp;&nbsp;</td>
197          <td class="paramname"> <em>extrinsic_input</em>, </td>
198        </tr>
199        <tr>
200          <td class="paramkey"></td>
201          <td></td>
202          <td class="paramtype">QLLRvec &amp;&nbsp;</td>
203          <td class="paramname"> <em>extrinsic_output</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>set_terminated</em> = <code>false</code></td><td>&nbsp;</td>
210        </tr>
211        <tr>
212          <td></td>
213          <td>)</td>
214          <td></td><td></td><td><code> [virtual]</code></td>
215        </tr>
216      </table>
217</div>
218<div class="memdoc">
219
220<p>
221Implementation of the log-map decoder using quantized LLR values (the <code>QLLR</code> type) and table-lookup (using the <code><a class="el" href="classitpp_1_1LLR__calc__unit.html" title="Log-likelihood algebra calculation unit.">LLR_calc_unit</a></code> class).
222<p>
223<dl compact><dt><b>Parameters:</b></dt><dd>
224  <table border="0" cellspacing="2" cellpadding="0">
225    <tr><td valign="top"></td><td valign="top"><em>rec_systematic</em>&nbsp;</td><td>Including both systematic bits and tail bits (if any) </td></tr>
226    <tr><td valign="top"></td><td valign="top"><em>rec_parity</em>&nbsp;</td><td>Matrix including all parity bits from all polynomials as well as parity bits from the tail (if terminated) </td></tr>
227    <tr><td valign="top"></td><td valign="top"><em>extrinsic_input</em>&nbsp;</td><td>For all systematic bits </td></tr>
228    <tr><td valign="top"></td><td valign="top"><em>extrinsic_output</em>&nbsp;</td><td>For all systematic bits </td></tr>
229    <tr><td valign="top"></td><td valign="top"><em>set_terminated</em>&nbsp;</td><td>Equal to <em>true</em> if the trellis was terminated by the encoder and false otherwise </td></tr>
230  </table>
231</dl>
232
233<p>References <a class="el" href="itassert_8h-source.html#l00094">it_assert</a>, and <a class="el" href="llr_8h-source.html#l00270">itpp::LLR_calc_unit::jaclog()</a>.</p>
234
235</div>
236</div><p>
237<a class="anchor" name="f3e37cf8d01e9e79ebfcd93a3e8ebd4c"></a><!-- doxytag: member="itpp::Rec_Syst_Conv_Code::log_decode" ref="f3e37cf8d01e9e79ebfcd93a3e8ebd4c" args="(const vec &amp;rec_systematic, const mat &amp;rec_parity, const vec &amp;extrinsic_input, vec &amp;extrinsic_output, bool set_terminated=false, std::string metric=&quot;LOGMAX&quot;)" -->
238<div class="memitem">
239<div class="memproto">
240      <table class="memname">
241        <tr>
242          <td class="memname">void itpp::Rec_Syst_Conv_Code::log_decode           </td>
243          <td>(</td>
244          <td class="paramtype">const vec &amp;&nbsp;</td>
245          <td class="paramname"> <em>rec_systematic</em>, </td>
246        </tr>
247        <tr>
248          <td class="paramkey"></td>
249          <td></td>
250          <td class="paramtype">const mat &amp;&nbsp;</td>
251          <td class="paramname"> <em>rec_parity</em>, </td>
252        </tr>
253        <tr>
254          <td class="paramkey"></td>
255          <td></td>
256          <td class="paramtype">const vec &amp;&nbsp;</td>
257          <td class="paramname"> <em>extrinsic_input</em>, </td>
258        </tr>
259        <tr>
260          <td class="paramkey"></td>
261          <td></td>
262          <td class="paramtype">vec &amp;&nbsp;</td>
263          <td class="paramname"> <em>extrinsic_output</em>, </td>
264        </tr>
265        <tr>
266          <td class="paramkey"></td>
267          <td></td>
268          <td class="paramtype">bool&nbsp;</td>
269          <td class="paramname"> <em>set_terminated</em> = <code>false</code>, </td>
270        </tr>
271        <tr>
272          <td class="paramkey"></td>
273          <td></td>
274          <td class="paramtype">std::string&nbsp;</td>
275          <td class="paramname"> <em>metric</em> = <code>&quot;LOGMAX&quot;</code></td><td>&nbsp;</td>
276        </tr>
277        <tr>
278          <td></td>
279          <td>)</td>
280          <td></td><td></td><td><code> [virtual]</code></td>
281        </tr>
282      </table>
283</div>
284<div class="memdoc">
285
286<p>
287Log domain implementation of the Maximum A Posteriori (MAP) Probability symbol-by-symbol decoder.
288<p>
289The extrinsic_input is the a priori information on each systematic bit. If no a priori information is available, this vector should contain only zeros. The extrinsic_output term may be passed to a subsequent decoder in a Turbo scheme. The decision variable is <div class="fragment"><pre class="fragment"> L = Lc*rec_systematic + extrinsic_output + extrinsic_input
290</pre></div> where <div class="fragment"><pre class="fragment"> Lc = 4*<a class="code" href="group__miscfunc.html#gf559d29ca56ad3396a4284964b01a9b0" title="Square root of the elements.">sqrt</a>(Ec)/N0
291</pre></div><p>
292<dl compact><dt><b>Parameters:</b></dt><dd>
293  <table border="0" cellspacing="2" cellpadding="0">
294    <tr><td valign="top"></td><td valign="top"><em>rec_systematic</em>&nbsp;</td><td>Including both systematic bits and tail bits (if any) </td></tr>
295    <tr><td valign="top"></td><td valign="top"><em>rec_parity</em>&nbsp;</td><td>Matrix including all parity bits from all polynomials as well as parity bits from the tail (if terminated) </td></tr>
296    <tr><td valign="top"></td><td valign="top"><em>extrinsic_input</em>&nbsp;</td><td>For all systematic bits </td></tr>
297    <tr><td valign="top"></td><td valign="top"><em>extrinsic_output</em>&nbsp;</td><td>For all systematic bits </td></tr>
298    <tr><td valign="top"></td><td valign="top"><em>set_terminated</em>&nbsp;</td><td>Equal to <em>true</em> if the trellis was terminated by the encoder and false otherwise </td></tr>
299    <tr><td valign="top"></td><td valign="top"><em>metric</em>&nbsp;</td><td>May be "LOGMAP", "LOGMAX" (default), or "TABLE"</td></tr>
300  </table>
301</dl>
302<b>Note:</b> Unless LOGMAX decoding is desired, it is recommended to use the TABLE metric instead of LOGMAP as the table-based decoder is much faster and numerically stable.
303<p>References <a class="el" href="itassert_8h-source.html#l00094">it_assert</a>, <a class="el" href="itassert_8h-source.html#l00126">it_error</a>, <a class="el" href="matfunc_8h-source.html#l00051">itpp::length()</a>, <a class="el" href="log__exp_8h-source.html#l00137">itpp::log_add()</a>, <a class="el" href="tcp_8h-source.html#l00117">itpp::max()</a>, <a class="el" href="llr_8h-source.html#l00230">itpp::LLR_calc_unit::to_double()</a>, and <a class="el" href="llr_8h-source.html#l00235">itpp::LLR_calc_unit::to_qllr()</a>.</p>
304
305<p>Referenced by <a class="el" href="turbo_8cpp-source.html#l00341">itpp::Turbo_Codec::decode_block()</a>.</p>
306
307</div>
308</div><p>
309<a class="anchor" name="740c624c372bc5620c8448d73bbd8c84"></a><!-- doxytag: member="itpp::Rec_Syst_Conv_Code::log_decode_n2" ref="740c624c372bc5620c8448d73bbd8c84" args="(const QLLRvec &amp;rec_systematic, const QLLRvec &amp;rec_parity, const QLLRvec &amp;extrinsic_input, QLLRvec &amp;extrinsic_output, bool set_terminated=false)" -->
310<div class="memitem">
311<div class="memproto">
312      <table class="memname">
313        <tr>
314          <td class="memname">void itpp::Rec_Syst_Conv_Code::log_decode_n2           </td>
315          <td>(</td>
316          <td class="paramtype">const QLLRvec &amp;&nbsp;</td>
317          <td class="paramname"> <em>rec_systematic</em>, </td>
318        </tr>
319        <tr>
320          <td class="paramkey"></td>
321          <td></td>
322          <td class="paramtype">const QLLRvec &amp;&nbsp;</td>
323          <td class="paramname"> <em>rec_parity</em>, </td>
324        </tr>
325        <tr>
326          <td class="paramkey"></td>
327          <td></td>
328          <td class="paramtype">const QLLRvec &amp;&nbsp;</td>
329          <td class="paramname"> <em>extrinsic_input</em>, </td>
330        </tr>
331        <tr>
332          <td class="paramkey"></td>
333          <td></td>
334          <td class="paramtype">QLLRvec &amp;&nbsp;</td>
335          <td class="paramname"> <em>extrinsic_output</em>, </td>
336        </tr>
337        <tr>
338          <td class="paramkey"></td>
339          <td></td>
340          <td class="paramtype">bool&nbsp;</td>
341          <td class="paramname"> <em>set_terminated</em> = <code>false</code></td><td>&nbsp;</td>
342        </tr>
343        <tr>
344          <td></td>
345          <td>)</td>
346          <td></td><td></td><td><code> [virtual]</code></td>
347        </tr>
348      </table>
349</div>
350<div class="memdoc">
351
352<p>
353Implementation of the log-map decoder for the n=2 case using quantized LLR values (the <code>QLLR</code> type) and table-lookup (using the <code><a class="el" href="classitpp_1_1LLR__calc__unit.html" title="Log-likelihood algebra calculation unit.">LLR_calc_unit</a></code> class).
354<p>
355<dl compact><dt><b>Parameters:</b></dt><dd>
356  <table border="0" cellspacing="2" cellpadding="0">
357    <tr><td valign="top"></td><td valign="top"><em>rec_systematic</em>&nbsp;</td><td>Including both systematic bits and tail bits (if any) </td></tr>
358    <tr><td valign="top"></td><td valign="top"><em>rec_parity</em>&nbsp;</td><td>Matrix including all parity bits from all polynomials as well as parity bits from the tail (if terminated) </td></tr>
359    <tr><td valign="top"></td><td valign="top"><em>extrinsic_input</em>&nbsp;</td><td>For all systematic bits </td></tr>
360    <tr><td valign="top"></td><td valign="top"><em>extrinsic_output</em>&nbsp;</td><td>For all systematic bits </td></tr>
361    <tr><td valign="top"></td><td valign="top"><em>set_terminated</em>&nbsp;</td><td>Equal to <em>true</em> if the trellis was terminated by the encoder and false otherwise </td></tr>
362  </table>
363</dl>
364
365<p>References <a class="el" href="itassert_8h-source.html#l00094">it_assert</a>, <a class="el" href="llr_8h-source.html#l00270">itpp::LLR_calc_unit::jaclog()</a>, and <a class="el" href="misc__stat_8h-source.html#l00193">itpp::norm()</a>.</p>
366
367</div>
368</div><p>
369<a class="anchor" name="b39d08e50d99f8fc83296ea8af338fa6"></a><!-- doxytag: member="itpp::Rec_Syst_Conv_Code::log_decode_n2" ref="b39d08e50d99f8fc83296ea8af338fa6" args="(const vec &amp;rec_systematic, const vec &amp;rec_parity, const vec &amp;extrinsic_input, vec &amp;extrinsic_output, bool set_terminated=false, std::string metric=&quot;LOGMAX&quot;)" -->
370<div class="memitem">
371<div class="memproto">
372      <table class="memname">
373        <tr>
374          <td class="memname">void itpp::Rec_Syst_Conv_Code::log_decode_n2           </td>
375          <td>(</td>
376          <td class="paramtype">const vec &amp;&nbsp;</td>
377          <td class="paramname"> <em>rec_systematic</em>, </td>
378        </tr>
379        <tr>
380          <td class="paramkey"></td>
381          <td></td>
382          <td class="paramtype">const vec &amp;&nbsp;</td>
383          <td class="paramname"> <em>rec_parity</em>, </td>
384        </tr>
385        <tr>
386          <td class="paramkey"></td>
387          <td></td>
388          <td class="paramtype">const vec &amp;&nbsp;</td>
389          <td class="paramname"> <em>extrinsic_input</em>, </td>
390        </tr>
391        <tr>
392          <td class="paramkey"></td>
393          <td></td>
394          <td class="paramtype">vec &amp;&nbsp;</td>
395          <td class="paramname"> <em>extrinsic_output</em>, </td>
396        </tr>
397        <tr>
398          <td class="paramkey"></td>
399          <td></td>
400          <td class="paramtype">bool&nbsp;</td>
401          <td class="paramname"> <em>set_terminated</em> = <code>false</code>, </td>
402        </tr>
403        <tr>
404          <td class="paramkey"></td>
405          <td></td>
406          <td class="paramtype">std::string&nbsp;</td>
407          <td class="paramname"> <em>metric</em> = <code>&quot;LOGMAX&quot;</code></td><td>&nbsp;</td>
408        </tr>
409        <tr>
410          <td></td>
411          <td>)</td>
412          <td></td><td></td><td><code> [virtual]</code></td>
413        </tr>
414      </table>
415</div>
416<div class="memdoc">
417
418<p>
419Special Log-MAP/Log-MAX decoder implementation for <em>n</em> = 2.
420<p>
421<dl compact><dt><b>Parameters:</b></dt><dd>
422  <table border="0" cellspacing="2" cellpadding="0">
423    <tr><td valign="top"></td><td valign="top"><em>rec_systematic</em>&nbsp;</td><td>Including both systematic bits and tail bits (if any) </td></tr>
424    <tr><td valign="top"></td><td valign="top"><em>rec_parity</em>&nbsp;</td><td>Matrix including all parity bits from all polynomials as well as parity bits from the tail (if terminated) </td></tr>
425    <tr><td valign="top"></td><td valign="top"><em>extrinsic_input</em>&nbsp;</td><td>For all systematic bits </td></tr>
426    <tr><td valign="top"></td><td valign="top"><em>extrinsic_output</em>&nbsp;</td><td>For all systematic bits </td></tr>
427    <tr><td valign="top"></td><td valign="top"><em>set_terminated</em>&nbsp;</td><td>Equal to <em>true</em> if the trellis was terminated by the encoder and false otherwise </td></tr>
428    <tr><td valign="top"></td><td valign="top"><em>metric</em>&nbsp;</td><td>May be "LOGMAP", "LOGMAX" (default), or "TABLE"</td></tr>
429  </table>
430</dl>
431<b>Note:</b> Unless LOGMAX decoding is desired, it is recommended to use the TABLE metric instead of LOGMAP as the table-based decoder is much faster and numerically stable.
432<p>References <a class="el" href="itassert_8h-source.html#l00094">it_assert</a>, <a class="el" href="itassert_8h-source.html#l00126">it_error</a>, <a class="el" href="matfunc_8h-source.html#l00051">itpp::length()</a>, <a class="el" href="log__exp_8h-source.html#l00137">itpp::log_add()</a>, <a class="el" href="tcp_8h-source.html#l00117">itpp::max()</a>, <a class="el" href="misc__stat_8h-source.html#l00193">itpp::norm()</a>, <a class="el" href="llr_8h-source.html#l00230">itpp::LLR_calc_unit::to_double()</a>, and <a class="el" href="llr_8h-source.html#l00235">itpp::LLR_calc_unit::to_qllr()</a>.</p>
433
434</div>
435</div><p>
436<a class="anchor" name="12c825eac22df94cbc1c5b7518dea14d"></a><!-- doxytag: member="itpp::Rec_Syst_Conv_Code::map_decode" ref="12c825eac22df94cbc1c5b7518dea14d" args="(const vec &amp;rec_systematic, const mat &amp;rec_parity, const vec &amp;extrinsic_input, vec &amp;extrinsic_output, bool set_terminated=false)" -->
437<div class="memitem">
438<div class="memproto">
439      <table class="memname">
440        <tr>
441          <td class="memname">void itpp::Rec_Syst_Conv_Code::map_decode           </td>
442          <td>(</td>
443          <td class="paramtype">const vec &amp;&nbsp;</td>
444          <td class="paramname"> <em>rec_systematic</em>, </td>
445        </tr>
446        <tr>
447          <td class="paramkey"></td>
448          <td></td>
449          <td class="paramtype">const mat &amp;&nbsp;</td>
450          <td class="paramname"> <em>rec_parity</em>, </td>
451        </tr>
452        <tr>
453          <td class="paramkey"></td>
454          <td></td>
455          <td class="paramtype">const vec &amp;&nbsp;</td>
456          <td class="paramname"> <em>extrinsic_input</em>, </td>
457        </tr>
458        <tr>
459          <td class="paramkey"></td>
460          <td></td>
461          <td class="paramtype">vec &amp;&nbsp;</td>
462          <td class="paramname"> <em>extrinsic_output</em>, </td>
463        </tr>
464        <tr>
465          <td class="paramkey"></td>
466          <td></td>
467          <td class="paramtype">bool&nbsp;</td>
468          <td class="paramname"> <em>set_terminated</em> = <code>false</code></td><td>&nbsp;</td>
469        </tr>
470        <tr>
471          <td></td>
472          <td>)</td>
473          <td></td><td></td><td><code> [virtual]</code></td>
474        </tr>
475      </table>
476</div>
477<div class="memdoc">
478
479<p>
480Maximum A Posteriori (MAP) Probability symbol-by-symbol decoder.
481<p>
482The extrinsic_input is the a priori information on each systematic bit. If no a priori information is available, this vector should contain only zeros. The extrinsic_output term may be passed to a subsequent decoder in a Turbo scheme. The decision variable is <div class="fragment"><pre class="fragment"> L = Lc*rec_systematic + extrinsic_output + extrinsic_input
483</pre></div> where <div class="fragment"><pre class="fragment"> Lc = 4*<a class="code" href="group__miscfunc.html#gf559d29ca56ad3396a4284964b01a9b0" title="Square root of the elements.">sqrt</a>(Ec)/N0
484</pre></div><p>
485<dl compact><dt><b>Parameters:</b></dt><dd>
486  <table border="0" cellspacing="2" cellpadding="0">
487    <tr><td valign="top"></td><td valign="top"><em>rec_systematic</em>&nbsp;</td><td>Including both systematic bits and tail bits (if any) </td></tr>
488    <tr><td valign="top"></td><td valign="top"><em>rec_parity</em>&nbsp;</td><td>Matrix including all parity bits from all polynomials as well as parity bits from the tail (if terminated) </td></tr>
489    <tr><td valign="top"></td><td valign="top"><em>extrinsic_input</em>&nbsp;</td><td>For all systematic bits </td></tr>
490    <tr><td valign="top"></td><td valign="top"><em>extrinsic_output</em>&nbsp;</td><td>For all systematic bits </td></tr>
491    <tr><td valign="top"></td><td valign="top"><em>set_terminated</em>&nbsp;</td><td>Equal to <em>true</em> if the trellis was terminated by the encoder and false otherwise</td></tr>
492  </table>
493</dl>
494<b>Note:</b> It is recommended to use the <a class="el" href="classitpp_1_1Rec__Syst__Conv__Code.html#f3e37cf8d01e9e79ebfcd93a3e8ebd4c" title="Log domain implementation of the Maximum A Posteriori (MAP) Probability symbol-by-symbol...">log_decode()</a> decoder instead, as it is much faster and more numerically stable.
495<p>References <a class="el" href="log__exp_8h-source.html#l00127">itpp::trunc_exp()</a>, <a class="el" href="log__exp_8h-source.html#l00105">itpp::trunc_log()</a>, and <a class="el" href="group__specmat.html#g10723ecada06221cbe64fe2736a59de1">itpp::zeros()</a>.</p>
496
497<p>Referenced by <a class="el" href="turbo_8cpp-source.html#l00341">itpp::Turbo_Codec::decode_block()</a>.</p>
498
499</div>
500</div><p>
501<a class="anchor" name="d185b255dcc178cc3933ae430ce0620d"></a><!-- doxytag: member="itpp::Rec_Syst_Conv_Code::set_awgn_channel_parameters" ref="d185b255dcc178cc3933ae430ce0620d" args="(double Ec, double N0)" -->
502<div class="memitem">
503<div class="memproto">
504      <table class="memname">
505        <tr>
506          <td class="memname">void itpp::Rec_Syst_Conv_Code::set_awgn_channel_parameters           </td>
507          <td>(</td>
508          <td class="paramtype">double&nbsp;</td>
509          <td class="paramname"> <em>Ec</em>, </td>
510        </tr>
511        <tr>
512          <td class="paramkey"></td>
513          <td></td>
514          <td class="paramtype">double&nbsp;</td>
515          <td class="paramname"> <em>N0</em></td><td>&nbsp;</td>
516        </tr>
517        <tr>
518          <td></td>
519          <td>)</td>
520          <td></td><td></td><td></td>
521        </tr>
522      </table>
523</div>
524<div class="memdoc">
525
526<p>
527Sets the channel parameters needed for MAP-decoding.
528<p>
529<dl compact><dt><b>Parameters:</b></dt><dd>
530  <table border="0" cellspacing="2" cellpadding="0">
531    <tr><td valign="top"></td><td valign="top"><em>Ec</em>&nbsp;</td><td>is the energy per channel symbol </td></tr>
532    <tr><td valign="top"></td><td valign="top"><em>N0</em>&nbsp;</td><td>is the single-sided power spectral density of the AWGN on the channel. </td></tr>
533  </table>
534</dl>
535
536<p>References <a class="el" href="elem__math_8h-source.html#l00126">itpp::sqrt()</a>.</p>
537
538</div>
539</div><p>
540<a class="anchor" name="13d3ee61d778b62f3c2c259dfe4a71d3"></a><!-- doxytag: member="itpp::Rec_Syst_Conv_Code::set_generator_polynomials" ref="13d3ee61d778b62f3c2c259dfe4a71d3" args="(const ivec &amp;gen, int constraint_length)" -->
541<div class="memitem">
542<div class="memproto">
543      <table class="memname">
544        <tr>
545          <td class="memname">void itpp::Rec_Syst_Conv_Code::set_generator_polynomials           </td>
546          <td>(</td>
547          <td class="paramtype">const ivec &amp;&nbsp;</td>
548          <td class="paramname"> <em>gen</em>, </td>
549        </tr>
550        <tr>
551          <td class="paramkey"></td>
552          <td></td>
553          <td class="paramtype">int&nbsp;</td>
554          <td class="paramname"> <em>constraint_length</em></td><td>&nbsp;</td>
555        </tr>
556        <tr>
557          <td></td>
558          <td>)</td>
559          <td></td><td></td><td></td>
560        </tr>
561      </table>
562</div>
563<div class="memdoc">
564
565<p>
566Set generator polynomials.
567<p>
568The generator polynomials are given in Proakis integer form. First generator (gen(0)) is the recursive polynomial.<p>
569<dl compact><dt><b>Parameters:</b></dt><dd>
570  <table border="0" cellspacing="2" cellpadding="0">
571    <tr><td valign="top"></td><td valign="top"><em>gen</em>&nbsp;</td><td>A vector containing the generator polynomials of the RSC Code. </td></tr>
572    <tr><td valign="top"></td><td valign="top"><em>constraint_length</em>&nbsp;</td><td>The Constraint length of the encoder. </td></tr>
573  </table>
574</dl>
575
576<p>References <a class="el" href="log__exp_8h-source.html#l00236">itpp::log()</a>, and <a class="el" href="convcode_8cpp-source.html#l01439">itpp::reverse_int()</a>.</p>
577
578<p>Referenced by <a class="el" href="turbo_8cpp-source.html#l00035">itpp::Turbo_Codec::set_parameters()</a>.</p>
579
580</div>
581</div><p>
582<a class="anchor" name="f1e3fba48b14c660a56f168e2e878aa2"></a><!-- doxytag: member="itpp::Rec_Syst_Conv_Code::set_scaling_factor" ref="f1e3fba48b14c660a56f168e2e878aa2" args="(double in_Lc)" -->
583<div class="memitem">
584<div class="memproto">
585      <table class="memname">
586        <tr>
587          <td class="memname">void itpp::Rec_Syst_Conv_Code::set_scaling_factor           </td>
588          <td>(</td>
589          <td class="paramtype">double&nbsp;</td>
590          <td class="paramname"> <em>in_Lc</em>          </td>
591          <td>&nbsp;)&nbsp;</td>
592          <td></td>
593        </tr>
594      </table>
595</div>
596<div class="memdoc">
597
598<p>
599Set scaling factor for the decoder.
600<p>
601<dl compact><dt><b>Parameters:</b></dt><dd>
602  <table border="0" cellspacing="2" cellpadding="0">
603    <tr><td valign="top"></td><td valign="top"><em>in_Lc</em>&nbsp;</td><td>is the channel reliability factor (i.e. <em>Lc</em> = 4 x sqrt( <em>Ec</em> ) / <em>N0</em>) </td></tr>
604  </table>
605</dl>
606
607</div>
608</div><p>
609<hr>The documentation for this class was generated from the following files:<ul>
610<li><a class="el" href="rec__syst__conv__code_8h-source.html">rec_syst_conv_code.h</a><li><a class="el" href="rec__syst__conv__code_8cpp.html">rec_syst_conv_code.cpp</a></ul>
611</div>
612<hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:02:19 2009 for mixpp by&nbsp;
613<a href="http://www.doxygen.org/index.html">
614<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
615</body>
616</html>
Note: See TracBrowser for help on using the browser.