root/doc/html/classitpp_1_1LDPC__Code.html @ 353

Revision 353, 50.3 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::LDPC_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_1LDPC__Code.html">LDPC_Code</a>
68  </div>
69</div>
70<div class="contents">
71<h1>itpp::LDPC_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::LDPC_Code" --><!-- doxytag: inherits="itpp::Channel_Code" -->Low-density parity check (LDPC) codec. 
75<a href="#_details">More...</a>
76<p>
77<code>#include &lt;<a class="el" href="ldpc_8h-source.html">ldpc.h</a>&gt;</code>
78<p>
79
80<p>
81<a href="classitpp_1_1LDPC__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="67225734edb76c509e25eb5c03504bb7"></a><!-- doxytag: member="itpp::LDPC_Code::LDPC_Code" ref="67225734edb76c509e25eb5c03504bb7" args="()" -->
85&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#67225734edb76c509e25eb5c03504bb7">LDPC_Code</a> ()</td></tr>
86
87<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor. <br></td></tr>
88<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#25bd58ebafe70752ab5b8672e60d706f">LDPC_Code</a> (const <a class="el" href="classitpp_1_1LDPC__Parity.html">LDPC_Parity</a> *const H, <a class="el" href="classitpp_1_1LDPC__Generator.html">LDPC_Generator</a> *const <a class="el" href="classitpp_1_1LDPC__Code.html#8e0a35c62e26fe98fe3a0b1fbdbb4ac0">G</a>=0)</td></tr>
89
90<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor, from a parity check matrix and optionally a generator.  <a href="#25bd58ebafe70752ab5b8672e60d706f"></a><br></td></tr>
91<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#708c727acf1fd6dbc42644950c2062a1">LDPC_Code</a> (const std::string &amp;filename, <a class="el" href="classitpp_1_1LDPC__Generator.html">LDPC_Generator</a> *const <a class="el" href="classitpp_1_1LDPC__Code.html#8e0a35c62e26fe98fe3a0b1fbdbb4ac0">G</a>=0)</td></tr>
92
93<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor, from a saved file.  <a href="#708c727acf1fd6dbc42644950c2062a1"></a><br></td></tr>
94<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1cef517f16fd7731457d5b5cd5002222"></a><!-- doxytag: member="itpp::LDPC_Code::~LDPC_Code" ref="1cef517f16fd7731457d5b5cd5002222" args="()" -->
95virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#1cef517f16fd7731457d5b5cd5002222">~LDPC_Code</a> ()</td></tr>
96
97<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor. <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_1LDPC__Code.html#cb246790e35667c0fa2f72cde8204044">set_code</a> (const <a class="el" href="classitpp_1_1LDPC__Parity.html">LDPC_Parity</a> *const H, <a class="el" href="classitpp_1_1LDPC__Generator.html">LDPC_Generator</a> *const <a class="el" href="classitpp_1_1LDPC__Code.html#8e0a35c62e26fe98fe3a0b1fbdbb4ac0">G</a>=0)</td></tr>
99
100<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the codec, from a parity check matrix and optionally a generator.  <a href="#cb246790e35667c0fa2f72cde8204044"></a><br></td></tr>
101<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#eb77df900d57a21f4e58d61b89021137">load_code</a> (const std::string &amp;filename, <a class="el" href="classitpp_1_1LDPC__Generator.html">LDPC_Generator</a> *const <a class="el" href="classitpp_1_1LDPC__Code.html#8e0a35c62e26fe98fe3a0b1fbdbb4ac0">G</a>=0)</td></tr>
102
103<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the codec, by reading from a saved file.  <a href="#eb77df900d57a21f4e58d61b89021137"></a><br></td></tr>
104<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#11d57db70a6f26d1e61645bd4d46d2be">save_code</a> (const std::string &amp;filename) const </td></tr>
105
106<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Save the codec to a file.  <a href="#11d57db70a6f26d1e61645bd4d46d2be"></a><br></td></tr>
107<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#1dc075d2037b99063e56c6367125f7c1">set_decoding_method</a> (const std::string &amp;method)</td></tr>
108
109<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the decoding method.  <a href="#1dc075d2037b99063e56c6367125f7c1"></a><br></td></tr>
110<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#e0973ce52201a50b152fc12d0ea2bede">set_exit_conditions</a> (int <a class="el" href="classitpp_1_1LDPC__Code.html#bb224992cccd0175c11dd347052736d4">max_iters</a>, bool syndr_check_each_iter=true, bool syndr_check_at_start=false)</td></tr>
111
112<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the decoding loop exit conditions.  <a href="#e0973ce52201a50b152fc12d0ea2bede"></a><br></td></tr>
113<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4219bb70addf01ce19c014c69704b735"></a><!-- doxytag: member="itpp::LDPC_Code::set_llrcalc" ref="4219bb70addf01ce19c014c69704b735" args="(const LLR_calc_unit &amp;llrcalc)" -->
114void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#4219bb70addf01ce19c014c69704b735">set_llrcalc</a> (const <a class="el" href="classitpp_1_1LLR__calc__unit.html">LLR_calc_unit</a> &amp;<a class="el" href="classitpp_1_1LDPC__Code.html#50db4abe3af5c9e57ccf8c2a8f488433">llrcalc</a>)</td></tr>
115
116<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set LLR calculation unit. <br></td></tr>
117<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#640c68e85d0df3b607b96f7d3787e5a8">encode</a> (const bvec &amp;input, bvec &amp;output)</td></tr>
118
119<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Encode codeword.  <a href="#640c68e85d0df3b607b96f7d3787e5a8"></a><br></td></tr>
120<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d63f3f18ec1955866e50174fde361f1b"></a><!-- doxytag: member="itpp::LDPC_Code::encode" ref="d63f3f18ec1955866e50174fde361f1b" args="(const bvec &amp;input)" -->
121virtual bvec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#d63f3f18ec1955866e50174fde361f1b">encode</a> (const bvec &amp;input)</td></tr>
122
123<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Encode codeword. <br></td></tr>
124<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="99fb8f359baa6fb4aaa1e8e46dcd5281"></a><!-- doxytag: member="itpp::LDPC_Code::decode" ref="99fb8f359baa6fb4aaa1e8e46dcd5281" args="(const bvec &amp;, bvec &amp;)" -->
125virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#99fb8f359baa6fb4aaa1e8e46dcd5281">decode</a> (const bvec &amp;, bvec &amp;)</td></tr>
126
127<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Inherited from the base class - not implemented here. <br></td></tr>
128<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1afefa2e0da0e129c5bf90c230726211"></a><!-- doxytag: member="itpp::LDPC_Code::decode" ref="1afefa2e0da0e129c5bf90c230726211" args="(const bvec &amp;)" -->
129virtual bvec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#1afefa2e0da0e129c5bf90c230726211">decode</a> (const bvec &amp;)</td></tr>
130
131<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Inherited from the base class - not implemented here. <br></td></tr>
132<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dec3a0be8d3331253a86f6c70f71e4cd"></a><!-- doxytag: member="itpp::LDPC_Code::decode" ref="dec3a0be8d3331253a86f6c70f71e4cd" args="(const vec &amp;llr_in, bvec &amp;syst_bits)" -->
133virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#dec3a0be8d3331253a86f6c70f71e4cd">decode</a> (const vec &amp;llr_in, bvec &amp;syst_bits)</td></tr>
134
135<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function outputs systematic bits of the decoded codeword. <br></td></tr>
136<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="daf071dad2e2e521ae50330b33ccfca4"></a><!-- doxytag: member="itpp::LDPC_Code::decode" ref="daf071dad2e2e521ae50330b33ccfca4" args="(const vec &amp;llr_in)" -->
137virtual bvec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#daf071dad2e2e521ae50330b33ccfca4">decode</a> (const vec &amp;llr_in)</td></tr>
138
139<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function outputs systematic bits of the decoded codeword. <br></td></tr>
140<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fcddb278cb81265d6354094087dfcaca"></a><!-- doxytag: member="itpp::LDPC_Code::decode_soft_out" ref="fcddb278cb81265d6354094087dfcaca" args="(const vec &amp;llr_in, vec &amp;llr_out)" -->
141void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#fcddb278cb81265d6354094087dfcaca">decode_soft_out</a> (const vec &amp;llr_in, vec &amp;llr_out)</td></tr>
142
143<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function is a wrapper for <code><a class="el" href="classitpp_1_1LDPC__Code.html#d2643b5e6178c9664e4bc34621868f74" title="Belief propagation decoding.">bp_decode()</a></code>. <br></td></tr>
144<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e41b67c6bdc20bf449128742be587404"></a><!-- doxytag: member="itpp::LDPC_Code::decode_soft_out" ref="e41b67c6bdc20bf449128742be587404" args="(const vec &amp;llr_in)" -->
145vec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#e41b67c6bdc20bf449128742be587404">decode_soft_out</a> (const vec &amp;llr_in)</td></tr>
146
147<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function is a wrapper for <code><a class="el" href="classitpp_1_1LDPC__Code.html#d2643b5e6178c9664e4bc34621868f74" title="Belief propagation decoding.">bp_decode()</a></code>. <br></td></tr>
148<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#d2643b5e6178c9664e4bc34621868f74">bp_decode</a> (const QLLRvec &amp;LLRin, QLLRvec &amp;LLRout)</td></tr>
149
150<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Belief propagation decoding.  <a href="#d2643b5e6178c9664e4bc34621868f74"></a><br></td></tr>
151<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#a7dda5d95ea5b2e1967f7530089e2686">syndrome_check</a> (const QLLRvec &amp;LLR) const </td></tr>
152
153<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Syndrome check, on QLLR vector.  <a href="#a7dda5d95ea5b2e1967f7530089e2686"></a><br></td></tr>
154<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1def08d48a4342ac5f6aa022cb6c99d4"></a><!-- doxytag: member="itpp::LDPC_Code::syndrome_check" ref="1def08d48a4342ac5f6aa022cb6c99d4" args="(const bvec &amp;b) const " -->
155bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#1def08d48a4342ac5f6aa022cb6c99d4">syndrome_check</a> (const bvec &amp;b) const </td></tr>
156
157<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Syndrome check, on bit vector. <br></td></tr>
158<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0b5bb00ac0c304d4d98c3a803238a852"></a><!-- doxytag: member="itpp::LDPC_Code::get_rate" ref="0b5bb00ac0c304d4d98c3a803238a852" args="() const " -->
159double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#0b5bb00ac0c304d4d98c3a803238a852">get_rate</a> () const </td></tr>
160
161<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the coderate. <br></td></tr>
162<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="89cbc43a80cb950399b220343a45a551"></a><!-- doxytag: member="itpp::LDPC_Code::get_nvar" ref="89cbc43a80cb950399b220343a45a551" args="() const " -->
163int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#89cbc43a80cb950399b220343a45a551">get_nvar</a> () const </td></tr>
164
165<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the number of variable nodes. <br></td></tr>
166<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e29d996569bb6d7c4dd1d515f0575adc"></a><!-- doxytag: member="itpp::LDPC_Code::get_ncheck" ref="e29d996569bb6d7c4dd1d515f0575adc" args="() const " -->
167int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#e29d996569bb6d7c4dd1d515f0575adc">get_ncheck</a> () const </td></tr>
168
169<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the number of check nodes. <br></td></tr>
170<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="88cda37174caacfb6d0f6f2c5ee46748"></a><!-- doxytag: member="itpp::LDPC_Code::get_ninfo" ref="88cda37174caacfb6d0f6f2c5ee46748" args="() const " -->
171int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#88cda37174caacfb6d0f6f2c5ee46748">get_ninfo</a> () const </td></tr>
172
173<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the number of information bits per codeword. <br></td></tr>
174<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="644fa7036ea884b6157b009377532060"></a><!-- doxytag: member="itpp::LDPC_Code::get_decoding_method" ref="644fa7036ea884b6157b009377532060" args="() const " -->
175std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#644fa7036ea884b6157b009377532060">get_decoding_method</a> () const </td></tr>
176
177<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the decoding method. <br></td></tr>
178<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="249b1d3890a6d622ea46dbdf303394fe"></a><!-- doxytag: member="itpp::LDPC_Code::get_nrof_iterations" ref="249b1d3890a6d622ea46dbdf303394fe" args="() const " -->
179int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#249b1d3890a6d622ea46dbdf303394fe">get_nrof_iterations</a> () const </td></tr>
180
181<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the maximum number of iterations of the decoder. <br></td></tr>
182<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="73803c985e4fee2942e280f0598a1308"></a><!-- doxytag: member="itpp::LDPC_Code::get_llrcalc" ref="73803c985e4fee2942e280f0598a1308" args="() const " -->
183<a class="el" href="classitpp_1_1LLR__calc__unit.html">LLR_calc_unit</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#73803c985e4fee2942e280f0598a1308">get_llrcalc</a> () const </td></tr>
184
185<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get LLR calculation unit used in decoder. <br></td></tr>
186<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
187<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="315028cb705384218de166866966bd8c"></a><!-- doxytag: member="itpp::LDPC_Code::decoder_parameterization" ref="315028cb705384218de166866966bd8c" args="(const LDPC_Parity *const H)" -->
188void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#315028cb705384218de166866966bd8c">decoder_parameterization</a> (const <a class="el" href="classitpp_1_1LDPC__Parity.html">LDPC_Parity</a> *const H)</td></tr>
189
190<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function to compute decoder parameterization. <br></td></tr>
191<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8d5308e5ca059e8b15aaa44402c381ca"></a><!-- doxytag: member="itpp::LDPC_Code::integrity_check" ref="8d5308e5ca059e8b15aaa44402c381ca" args="()" -->
192void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#8d5308e5ca059e8b15aaa44402c381ca">integrity_check</a> ()</td></tr>
193
194<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function to check the integrity of the parity check matrix and generator. <br></td></tr>
195<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="91e331956ee790ae2f6f732b9310b0cf"></a><!-- doxytag: member="itpp::LDPC_Code::setup_decoder" ref="91e331956ee790ae2f6f732b9310b0cf" args="()" -->
196void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#91e331956ee790ae2f6f732b9310b0cf">setup_decoder</a> ()</td></tr>
197
198<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialize decoder. <br></td></tr>
199<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
200<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3c4fd1b5f0853d65d4721aabcb6269a0"></a><!-- doxytag: member="itpp::LDPC_Code::H_defined" ref="3c4fd1b5f0853d65d4721aabcb6269a0" args="" -->
201bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#3c4fd1b5f0853d65d4721aabcb6269a0">H_defined</a></td></tr>
202
203<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">true if parity check matrix is defined <br></td></tr>
204<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f4ed785144777a683e3403f46a14c8b9"></a><!-- doxytag: member="itpp::LDPC_Code::G_defined" ref="f4ed785144777a683e3403f46a14c8b9" args="" -->
205bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#f4ed785144777a683e3403f46a14c8b9">G_defined</a></td></tr>
206
207<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">true if generator is defined <br></td></tr>
208<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="67763300074130d403b921e30bc73c18"></a><!-- doxytag: member="itpp::LDPC_Code::nvar" ref="67763300074130d403b921e30bc73c18" args="" -->
209int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#67763300074130d403b921e30bc73c18">nvar</a></td></tr>
210
211<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Number of variable nodes. <br></td></tr>
212<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ba49268475773e439d266ff900312060"></a><!-- doxytag: member="itpp::LDPC_Code::ncheck" ref="ba49268475773e439d266ff900312060" args="" -->
213int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#ba49268475773e439d266ff900312060">ncheck</a></td></tr>
214
215<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Number of check nodes. <br></td></tr>
216<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8e0a35c62e26fe98fe3a0b1fbdbb4ac0"></a><!-- doxytag: member="itpp::LDPC_Code::G" ref="8e0a35c62e26fe98fe3a0b1fbdbb4ac0" args="" -->
217<a class="el" href="classitpp_1_1LDPC__Generator.html">LDPC_Generator</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#8e0a35c62e26fe98fe3a0b1fbdbb4ac0">G</a></td></tr>
218
219<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Generator object pointer. <br></td></tr>
220<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fae3d84382be09abb61569fc1dd22023"></a><!-- doxytag: member="itpp::LDPC_Code::dec_method" ref="fae3d84382be09abb61569fc1dd22023" args="" -->
221std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#fae3d84382be09abb61569fc1dd22023">dec_method</a></td></tr>
222
223<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Decoding method. <br></td></tr>
224<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bb224992cccd0175c11dd347052736d4"></a><!-- doxytag: member="itpp::LDPC_Code::max_iters" ref="bb224992cccd0175c11dd347052736d4" args="" -->
225int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#bb224992cccd0175c11dd347052736d4">max_iters</a></td></tr>
226
227<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Maximum number of iterations. <br></td></tr>
228<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="162ef04a7ab6c84ae7eecddc62652105"></a><!-- doxytag: member="itpp::LDPC_Code::psc" ref="162ef04a7ab6c84ae7eecddc62652105" args="" -->
229bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#162ef04a7ab6c84ae7eecddc62652105">psc</a></td></tr>
230
231<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">check syndrom after each iteration <br></td></tr>
232<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="64ca9f09f9fe699f0be44b7187f7b54a"></a><!-- doxytag: member="itpp::LDPC_Code::pisc" ref="64ca9f09f9fe699f0be44b7187f7b54a" args="" -->
233bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#64ca9f09f9fe699f0be44b7187f7b54a">pisc</a></td></tr>
234
235<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">check syndrom before first iteration <br></td></tr>
236<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="50db4abe3af5c9e57ccf8c2a8f488433"></a><!-- doxytag: member="itpp::LDPC_Code::llrcalc" ref="50db4abe3af5c9e57ccf8c2a8f488433" args="" -->
237<a class="el" href="classitpp_1_1LLR__calc__unit.html">LLR_calc_unit</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#50db4abe3af5c9e57ccf8c2a8f488433">llrcalc</a></td></tr>
238
239<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">LLR calculation unit. <br></td></tr>
240<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
241<tr><td class="memItemLeft" nowrap align="right" valign="top">std::ostream &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Code.html#98ccdcb0c1e67513c9e65539ef777f96">operator&lt;&lt;</a> (std::ostream &amp;os, const <a class="el" href="classitpp_1_1LDPC__Code.html">LDPC_Code</a> &amp;C)</td></tr>
242
243<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Print some properties of the codec in plain text.  <a href="#98ccdcb0c1e67513c9e65539ef777f96"></a><br></td></tr>
244</table>
245<hr><a name="_details"></a><h2>Detailed Description</h2>
246Low-density parity check (LDPC) codec.
247<p>
248This class provides the functionality for encoding and decoding of LDPC codes defined via <code><a class="el" href="classitpp_1_1LDPC__Parity.html" title="LDPC parity check matrix generic class.">LDPC_Parity</a></code> and <code><a class="el" href="classitpp_1_1LDPC__Generator.html" title="LDPC Generator pure virtual base class.">LDPC_Generator</a></code> classes.<p>
249LDPC codecs are constructed from parity check and generator matrices. Since the procedure of constructing the codec can be time-consuming (for example, due to optimization of the parity matrix and computation of the generator matrix), codecs can be saved to a file for later use. This class provides functionality and a special file format (the file format is designed to optimize the operation of the decoder) to do this. Some examples of load and save operations follow:<p>
250Saving a codec without generator matrix: <div class="fragment"><pre class="fragment">  <span class="comment">// assume the parity matrix is already defined and stored in H</span>
251  <a class="code" href="classitpp_1_1LDPC__Code.html#67225734edb76c509e25eb5c03504bb7" title="Default constructor.">LDPC_Code</a> C(&amp;H);
252  C.save_code(<span class="stringliteral">"filename.it"</span>);
253</pre></div><p>
254Saving a codec with generator matrix (for the example of systematic generator): <div class="fragment"><pre class="fragment">  <span class="comment">// assume the parity matrix is already defined and stored in H</span>
255  LDPC_Generator_Systematic <a class="code" href="classitpp_1_1LDPC__Code.html#8e0a35c62e26fe98fe3a0b1fbdbb4ac0" title="Generator object pointer.">G</a>(&amp;H); <span class="comment">// create generator</span>
256  <a class="code" href="classitpp_1_1LDPC__Code.html#67225734edb76c509e25eb5c03504bb7" title="Default constructor.">LDPC_Code</a> C(&amp;H, &amp;<a class="code" href="classitpp_1_1LDPC__Code.html#8e0a35c62e26fe98fe3a0b1fbdbb4ac0" title="Generator object pointer.">G</a>);
257  C.save_code(<span class="stringliteral">"filename.it"</span>);
258</pre></div><p>
259Loading a codec without a generator: <div class="fragment"><pre class="fragment">  <a class="code" href="classitpp_1_1LDPC__Code.html#67225734edb76c509e25eb5c03504bb7" title="Default constructor.">LDPC_Code</a>(<span class="stringliteral">"filename.it"</span>);
260</pre></div><p>
261Loading a codec with a generator (systematic in this example): <div class="fragment"><pre class="fragment">  LDPC_Generator_Systematic <a class="code" href="classitpp_1_1LDPC__Code.html#8e0a35c62e26fe98fe3a0b1fbdbb4ac0" title="Generator object pointer.">G</a>; <span class="comment">// the generator object must be created first</span>
262  <a class="code" href="classitpp_1_1LDPC__Code.html#67225734edb76c509e25eb5c03504bb7" title="Default constructor.">LDPC_Code</a>(<span class="stringliteral">"filename.it"</span>, &amp;G);
263</pre></div><p>
264<dl class="note" compact><dt><b>Note:</b></dt><dd>Please refer to the tutorials ldpc_gen_codes and ldpc_bersim_awgn for extensive examples of how to use LDPC codes.</dd></dl>
265<dl class="author" compact><dt><b>Author:</b></dt><dd>Erik G. Larsson and Adam Piatyszek </dd></dl>
266<hr><h2>Constructor &amp; Destructor Documentation</h2>
267<a class="anchor" name="25bd58ebafe70752ab5b8672e60d706f"></a><!-- doxytag: member="itpp::LDPC_Code::LDPC_Code" ref="25bd58ebafe70752ab5b8672e60d706f" args="(const LDPC_Parity *const H, LDPC_Generator *const G=0)" -->
268<div class="memitem">
269<div class="memproto">
270      <table class="memname">
271        <tr>
272          <td class="memname">itpp::LDPC_Code::LDPC_Code           </td>
273          <td>(</td>
274          <td class="paramtype">const <a class="el" href="classitpp_1_1LDPC__Parity.html">LDPC_Parity</a> *const &nbsp;</td>
275          <td class="paramname"> <em>H</em>, </td>
276        </tr>
277        <tr>
278          <td class="paramkey"></td>
279          <td></td>
280          <td class="paramtype"><a class="el" href="classitpp_1_1LDPC__Generator.html">LDPC_Generator</a> *const &nbsp;</td>
281          <td class="paramname"> <em>G</em> = <code>0</code></td><td>&nbsp;</td>
282        </tr>
283        <tr>
284          <td></td>
285          <td>)</td>
286          <td></td><td></td><td></td>
287        </tr>
288      </table>
289</div>
290<div class="memdoc">
291
292<p>
293Constructor, from a parity check matrix and optionally a generator.
294<p>
295This constructor simply calls <code><a class="el" href="classitpp_1_1LDPC__Code.html#cb246790e35667c0fa2f72cde8204044" title="Set the codec, from a parity check matrix and optionally a generator.">set_code()</a></code>.
296<p>References <a class="el" href="ldpc_8cpp-source.html#l01228">set_code()</a>.</p>
297
298</div>
299</div><p>
300<a class="anchor" name="708c727acf1fd6dbc42644950c2062a1"></a><!-- doxytag: member="itpp::LDPC_Code::LDPC_Code" ref="708c727acf1fd6dbc42644950c2062a1" args="(const std::string &amp;filename, LDPC_Generator *const G=0)" -->
301<div class="memitem">
302<div class="memproto">
303      <table class="memname">
304        <tr>
305          <td class="memname">itpp::LDPC_Code::LDPC_Code           </td>
306          <td>(</td>
307          <td class="paramtype">const std::string &amp;&nbsp;</td>
308          <td class="paramname"> <em>filename</em>, </td>
309        </tr>
310        <tr>
311          <td class="paramkey"></td>
312          <td></td>
313          <td class="paramtype"><a class="el" href="classitpp_1_1LDPC__Generator.html">LDPC_Generator</a> *const &nbsp;</td>
314          <td class="paramname"> <em>G</em> = <code>0</code></td><td>&nbsp;</td>
315        </tr>
316        <tr>
317          <td></td>
318          <td>)</td>
319          <td></td><td></td><td></td>
320        </tr>
321      </table>
322</div>
323<div class="memdoc">
324
325<p>
326Constructor, from a saved file.
327<p>
328This constructor simply calls <code><a class="el" href="classitpp_1_1LDPC__Code.html#eb77df900d57a21f4e58d61b89021137" title="Set the codec, by reading from a saved file.">load_code()</a></code>.
329<p>References <a class="el" href="ldpc_8cpp-source.html#l01240">load_code()</a>.</p>
330
331</div>
332</div><p>
333<hr><h2>Member Function Documentation</h2>
334<a class="anchor" name="d2643b5e6178c9664e4bc34621868f74"></a><!-- doxytag: member="itpp::LDPC_Code::bp_decode" ref="d2643b5e6178c9664e4bc34621868f74" args="(const QLLRvec &amp;LLRin, QLLRvec &amp;LLRout)" -->
335<div class="memitem">
336<div class="memproto">
337      <table class="memname">
338        <tr>
339          <td class="memname">int itpp::LDPC_Code::bp_decode           </td>
340          <td>(</td>
341          <td class="paramtype">const QLLRvec &amp;&nbsp;</td>
342          <td class="paramname"> <em>LLRin</em>, </td>
343        </tr>
344        <tr>
345          <td class="paramkey"></td>
346          <td></td>
347          <td class="paramtype">QLLRvec &amp;&nbsp;</td>
348          <td class="paramname"> <em>LLRout</em></td><td>&nbsp;</td>
349        </tr>
350        <tr>
351          <td></td>
352          <td>)</td>
353          <td></td><td></td><td></td>
354        </tr>
355      </table>
356</div>
357<div class="memdoc">
358
359<p>
360Belief propagation decoding.
361<p>
362This function implements the sum-product message passing decoder (Pearl's belief propagation) using LLR values as messages. A fast update mechanism is used for nodes with large degrees.<p>
363<dl compact><dt><b>Parameters:</b></dt><dd>
364  <table border="0" cellspacing="2" cellpadding="0">
365    <tr><td valign="top"></td><td valign="top"><em>LLRin</em>&nbsp;</td><td>vector of <code>nvar</code> input LLR values </td></tr>
366    <tr><td valign="top"></td><td valign="top"><em>LLRout</em>&nbsp;</td><td>vector of <code>nvar</code> output LLR values</td></tr>
367  </table>
368</dl>
369If the decoder converged to a valid codeword, the function returns the number of iterations performed. Otherwise the function returns the number of iterations performed but with negative sign.<p>
370One can use <code><a class="el" href="classitpp_1_1LDPC__Code.html#e0973ce52201a50b152fc12d0ea2bede" title="Set the decoding loop exit conditions.">set_exit_conditions()</a></code> method to change the number of decoding iterations and related parameters parameters. The decoding function uses <code><a class="el" href="classitpp_1_1LLR__calc__unit.html" title="Log-likelihood algebra calculation unit.">LLR_calc_unit</a></code> to implement table-lookup for the Boxplus operator. By setting the parameters of the <code><a class="el" href="classitpp_1_1LLR__calc__unit.html" title="Log-likelihood algebra calculation unit.">LLR_calc_unit</a></code> provided in <code><a class="el" href="classitpp_1_1LDPC__Code.html#4219bb70addf01ce19c014c69704b735" title="Set LLR calculation unit.">set_llrcalc()</a></code>, one can change the resolution, for example to use a logmax approximation. See the documentation of <code><a class="el" href="classitpp_1_1LLR__calc__unit.html" title="Log-likelihood algebra calculation unit.">LLR_calc_unit</a></code> for details on how to do this.
371<p>References <a class="el" href="llr_8cpp-source.html#l00123">itpp::LLR_calc_unit::Boxplus()</a>, <a class="el" href="ldpc_8h-source.html#l00917">H_defined</a>, <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="itassert_8h-source.html#l00163">it_info_debug</a>, <a class="el" href="itassert_8h-source.html#l00168">it_info_no_endl_debug</a>, <a class="el" href="ldpc_8h-source.html#l00928">llrcalc</a>, <a class="el" href="ldpc_8h-source.html#l00925">max_iters</a>, <a class="el" href="ldpc_8h-source.html#l00920">ncheck</a>, <a class="el" href="ldpc_8h-source.html#l00919">nvar</a>, <a class="el" href="ldpc_8h-source.html#l00927">pisc</a>, <a class="el" href="ldpc_8h-source.html#l00926">psc</a>, and <a class="el" href="ldpc_8cpp-source.html#l01852">syndrome_check()</a>.</p>
372
373<p>Referenced by <a class="el" href="ldpc_8cpp-source.html#l01356">decode()</a>, and <a class="el" href="ldpc_8cpp-source.html#l01371">decode_soft_out()</a>.</p>
374
375</div>
376</div><p>
377<a class="anchor" name="640c68e85d0df3b607b96f7d3787e5a8"></a><!-- doxytag: member="itpp::LDPC_Code::encode" ref="640c68e85d0df3b607b96f7d3787e5a8" args="(const bvec &amp;input, bvec &amp;output)" -->
378<div class="memitem">
379<div class="memproto">
380      <table class="memname">
381        <tr>
382          <td class="memname">void itpp::LDPC_Code::encode           </td>
383          <td>(</td>
384          <td class="paramtype">const bvec &amp;&nbsp;</td>
385          <td class="paramname"> <em>input</em>, </td>
386        </tr>
387        <tr>
388          <td class="paramkey"></td>
389          <td></td>
390          <td class="paramtype">bvec &amp;&nbsp;</td>
391          <td class="paramname"> <em>output</em></td><td>&nbsp;</td>
392        </tr>
393        <tr>
394          <td></td>
395          <td>)</td>
396          <td></td><td></td><td><code> [virtual]</code></td>
397        </tr>
398      </table>
399</div>
400<div class="memdoc">
401
402<p>
403Encode codeword.
404<p>
405This is a wrapper functions which calls a proper implementation from the <code><a class="el" href="classitpp_1_1LDPC__Generator.html" title="LDPC Generator pure virtual base class.">LDPC_Generator</a></code> object.<p>
406<dl compact><dt><b>Parameters:</b></dt><dd>
407  <table border="0" cellspacing="2" cellpadding="0">
408    <tr><td valign="top"></td><td valign="top"><em>input</em>&nbsp;</td><td>Vector of <code>ncheck</code> input bits </td></tr>
409    <tr><td valign="top"></td><td valign="top"><em>output</em>&nbsp;</td><td>Vector of <code>nvar</code> output bits </td></tr>
410  </table>
411</dl>
412
413<p>Implements <a class="el" href="classitpp_1_1Channel__Code.html#8e151b53b207d644598360537dacaf91">itpp::Channel_Code</a>.</p>
414
415<p>References <a class="el" href="classitpp_1_1LDPC__Generator.html#c0b88b84513103f2d1c19d62284648c2">itpp::LDPC_Generator::encode()</a>, <a class="el" href="ldpc_8h-source.html#l00921">G</a>, <a class="el" href="ldpc_8h-source.html#l00918">G_defined</a>, <a class="el" href="itassert_8h-source.html#l00094">it_assert</a>, <a class="el" href="itassert_8h-source.html#l00107">it_assert_debug</a>, and <a class="el" href="ldpc_8cpp-source.html#l01852">syndrome_check()</a>.</p>
416
417<p>Referenced by <a class="el" href="ldpc_8cpp-source.html#l01349">encode()</a>.</p>
418
419</div>
420</div><p>
421<a class="anchor" name="eb77df900d57a21f4e58d61b89021137"></a><!-- doxytag: member="itpp::LDPC_Code::load_code" ref="eb77df900d57a21f4e58d61b89021137" args="(const std::string &amp;filename, LDPC_Generator *const G=0)" -->
422<div class="memitem">
423<div class="memproto">
424      <table class="memname">
425        <tr>
426          <td class="memname">void itpp::LDPC_Code::load_code           </td>
427          <td>(</td>
428          <td class="paramtype">const std::string &amp;&nbsp;</td>
429          <td class="paramname"> <em>filename</em>, </td>
430        </tr>
431        <tr>
432          <td class="paramkey"></td>
433          <td></td>
434          <td class="paramtype"><a class="el" href="classitpp_1_1LDPC__Generator.html">LDPC_Generator</a> *const &nbsp;</td>
435          <td class="paramname"> <em>G</em> = <code>0</code></td><td>&nbsp;</td>
436        </tr>
437        <tr>
438          <td></td>
439          <td>)</td>
440          <td></td><td></td><td></td>
441        </tr>
442      </table>
443</div>
444<div class="memdoc">
445
446<p>
447Set the codec, by reading from a saved file.
448<p>
449The file format is defined in the source code. LDPC codecs can be saved with the function <code><a class="el" href="classitpp_1_1LDPC__Code.html#11d57db70a6f26d1e61645bd4d46d2be" title="Save the codec to a file.">save_code()</a></code>.<p>
450<dl compact><dt><b>Parameters:</b></dt><dd>
451  <table border="0" cellspacing="2" cellpadding="0">
452    <tr><td valign="top"></td><td valign="top"><em>filename</em>&nbsp;</td><td><a class="el" href="classitpp_1_1Name.html" title="Automatic naming when savingAn easy way to give a variable a name and optionally...">Name</a> of the file where the codec is stored </td></tr>
453    <tr><td valign="top"></td><td valign="top"><em>G</em>&nbsp;</td><td>A pointer to the optional generator object</td></tr>
454  </table>
455</dl>
456<dl class="note" compact><dt><b>Note:</b></dt><dd>If <code>G</code> points at <code>0</code> (default), the generator data is not read from the saved file. This means that the encoding can not be performed. </dd></dl>
457
458<p>References <a class="el" href="itfile_8cpp-source.html#l00060">itpp::it_ifile::close()</a>, <a class="el" href="ldpc_8h-source.html#l00921">G</a>, <a class="el" href="ldpc_8h-source.html#l00918">G_defined</a>, <a class="el" href="ldpc_8h-source.html#l00917">H_defined</a>, <a class="el" href="itassert_8h-source.html#l00094">it_assert</a>, <a class="el" href="itassert_8h-source.html#l00163">it_info_debug</a>, <a class="el" href="classitpp_1_1LDPC__Generator.html#8973051cc4b7073f84b2e3607c8ba837">itpp::LDPC_Generator::load()</a>, <a class="el" href="ldpc_8h-source.html#l00920">ncheck</a>, <a class="el" href="ldpc_8h-source.html#l00919">nvar</a>, and <a class="el" href="ldpc_8cpp-source.html#l01950">setup_decoder()</a>.</p>
459
460<p>Referenced by <a class="el" href="ldpc_8cpp-source.html#l01219">LDPC_Code()</a>.</p>
461
462</div>
463</div><p>
464<a class="anchor" name="11d57db70a6f26d1e61645bd4d46d2be"></a><!-- doxytag: member="itpp::LDPC_Code::save_code" ref="11d57db70a6f26d1e61645bd4d46d2be" args="(const std::string &amp;filename) const " -->
465<div class="memitem">
466<div class="memproto">
467      <table class="memname">
468        <tr>
469          <td class="memname">void itpp::LDPC_Code::save_code           </td>
470          <td>(</td>
471          <td class="paramtype">const std::string &amp;&nbsp;</td>
472          <td class="paramname"> <em>filename</em>          </td>
473          <td>&nbsp;)&nbsp;</td>
474          <td> const</td>
475        </tr>
476      </table>
477</div>
478<div class="memdoc">
479
480<p>
481Save the codec to a file.
482<p>
483<dl compact><dt><b>Parameters:</b></dt><dd>
484  <table border="0" cellspacing="2" cellpadding="0">
485    <tr><td valign="top"></td><td valign="top"><em>filename</em>&nbsp;</td><td><a class="el" href="classitpp_1_1Name.html" title="Automatic naming when savingAn easy way to give a variable a name and optionally...">Name</a> of the file where to store the codec</td></tr>
486  </table>
487</dl>
488<dl class="note" compact><dt><b>Note:</b></dt><dd>The decoder parameters (<code>max_iters</code>, <code>syndr_check_each_iter</code>, <code>syndr_check_at_start</code> and <code>llrcalc</code>) are not saved to a file. </dd></dl>
489
490<p>References <a class="el" href="itfile_8cpp-source.html#l00532">itpp::it_file::close()</a>, <a class="el" href="ldpc_8h-source.html#l00921">G</a>, <a class="el" href="ldpc_8h-source.html#l00918">G_defined</a>, <a class="el" href="ldpc_8h-source.html#l00917">H_defined</a>, <a class="el" href="itassert_8h-source.html#l00094">it_assert</a>, <a class="el" href="itassert_8h-source.html#l00163">it_info_debug</a>, <a class="el" href="ldpc_8h-source.html#l00920">ncheck</a>, <a class="el" href="ldpc_8h-source.html#l00919">nvar</a>, <a class="el" href="itfile_8cpp-source.html#l00514">itpp::it_file::open()</a>, and <a class="el" href="classitpp_1_1LDPC__Generator.html#6dc3ede11c56d04304c480b04507b8e5">itpp::LDPC_Generator::save()</a>.</p>
491
492</div>
493</div><p>
494<a class="anchor" name="cb246790e35667c0fa2f72cde8204044"></a><!-- doxytag: member="itpp::LDPC_Code::set_code" ref="cb246790e35667c0fa2f72cde8204044" args="(const LDPC_Parity *const H, LDPC_Generator *const G=0)" -->
495<div class="memitem">
496<div class="memproto">
497      <table class="memname">
498        <tr>
499          <td class="memname">void itpp::LDPC_Code::set_code           </td>
500          <td>(</td>
501          <td class="paramtype">const <a class="el" href="classitpp_1_1LDPC__Parity.html">LDPC_Parity</a> *const &nbsp;</td>
502          <td class="paramname"> <em>H</em>, </td>
503        </tr>
504        <tr>
505          <td class="paramkey"></td>
506          <td></td>
507          <td class="paramtype"><a class="el" href="classitpp_1_1LDPC__Generator.html">LDPC_Generator</a> *const &nbsp;</td>
508          <td class="paramname"> <em>G</em> = <code>0</code></td><td>&nbsp;</td>
509        </tr>
510        <tr>
511          <td></td>
512          <td>)</td>
513          <td></td><td></td><td></td>
514        </tr>
515      </table>
516</div>
517<div class="memdoc">
518
519<p>
520Set the codec, from a parity check matrix and optionally a generator.
521<p>
522<dl compact><dt><b>Parameters:</b></dt><dd>
523  <table border="0" cellspacing="2" cellpadding="0">
524    <tr><td valign="top"></td><td valign="top"><em>H</em>&nbsp;</td><td>The parity check matrix </td></tr>
525    <tr><td valign="top"></td><td valign="top"><em>G</em>&nbsp;</td><td>A pointer to the optional generator object </td></tr>
526  </table>
527</dl>
528
529<p>References <a class="el" href="ldpc_8cpp-source.html#l01880">decoder_parameterization()</a>, <a class="el" href="ldpc_8h-source.html#l00921">G</a>, <a class="el" href="ldpc_8h-source.html#l00918">G_defined</a>, <a class="el" href="ldpc_8cpp-source.html#l01959">integrity_check()</a>, and <a class="el" href="ldpc_8cpp-source.html#l01950">setup_decoder()</a>.</p>
530
531<p>Referenced by <a class="el" href="ldpc_8cpp-source.html#l01211">LDPC_Code()</a>.</p>
532
533</div>
534</div><p>
535<a class="anchor" name="1dc075d2037b99063e56c6367125f7c1"></a><!-- doxytag: member="itpp::LDPC_Code::set_decoding_method" ref="1dc075d2037b99063e56c6367125f7c1" args="(const std::string &amp;method)" -->
536<div class="memitem">
537<div class="memproto">
538      <table class="memname">
539        <tr>
540          <td class="memname">void itpp::LDPC_Code::set_decoding_method           </td>
541          <td>(</td>
542          <td class="paramtype">const std::string &amp;&nbsp;</td>
543          <td class="paramname"> <em>method</em>          </td>
544          <td>&nbsp;)&nbsp;</td>
545          <td></td>
546        </tr>
547      </table>
548</div>
549<div class="memdoc">
550
551<p>
552Set the decoding method.
553<p>
554Currently only a belief propagation method ("BP" or "bp") is supported.<p>
555<dl class="note" compact><dt><b>Note:</b></dt><dd>The default method set in the class constructors is "BP". </dd></dl>
556
557<p>References <a class="el" href="ldpc_8h-source.html#l00924">dec_method</a>, and <a class="el" href="itassert_8h-source.html#l00094">it_assert</a>.</p>
558
559</div>
560</div><p>
561<a class="anchor" name="e0973ce52201a50b152fc12d0ea2bede"></a><!-- doxytag: member="itpp::LDPC_Code::set_exit_conditions" ref="e0973ce52201a50b152fc12d0ea2bede" args="(int max_iters, bool syndr_check_each_iter=true, bool syndr_check_at_start=false)" -->
562<div class="memitem">
563<div class="memproto">
564      <table class="memname">
565        <tr>
566          <td class="memname">void itpp::LDPC_Code::set_exit_conditions           </td>
567          <td>(</td>
568          <td class="paramtype">int&nbsp;</td>
569          <td class="paramname"> <em>max_iters</em>, </td>
570        </tr>
571        <tr>
572          <td class="paramkey"></td>
573          <td></td>
574          <td class="paramtype">bool&nbsp;</td>
575          <td class="paramname"> <em>syndr_check_each_iter</em> = <code>true</code>, </td>
576        </tr>
577        <tr>
578          <td class="paramkey"></td>
579          <td></td>
580          <td class="paramtype">bool&nbsp;</td>
581          <td class="paramname"> <em>syndr_check_at_start</em> = <code>false</code></td><td>&nbsp;</td>
582        </tr>
583        <tr>
584          <td></td>
585          <td>)</td>
586          <td></td><td></td><td></td>
587        </tr>
588      </table>
589</div>
590<div class="memdoc">
591
592<p>
593Set the decoding loop exit conditions.
594<p>
595<dl compact><dt><b>Parameters:</b></dt><dd>
596  <table border="0" cellspacing="2" cellpadding="0">
597    <tr><td valign="top"></td><td valign="top"><em>max_iters</em>&nbsp;</td><td>Maximum number of the decoding iterations </td></tr>
598    <tr><td valign="top"></td><td valign="top"><em>syndr_check_each_iter</em>&nbsp;</td><td>If true, break the decoding loop as soon as valid codeword is found. Recommended value: <code>true</code>. </td></tr>
599    <tr><td valign="top"></td><td valign="top"><em>syndr_check_at_start</em>&nbsp;</td><td>If true, perform a syndrome check before entering the decoding loop. If LLRin corresponds to a valid codeword, set LLRout = LLRin. Recommended value: <code>false</code>.</td></tr>
600  </table>
601</dl>
602<dl class="note" compact><dt><b>Note:</b></dt><dd>The default values set in the class constructor are: "50", "true" and "false", respectively. </dd></dl>
603
604<p>References <a class="el" href="itassert_8h-source.html#l00094">it_assert</a>, <a class="el" href="ldpc_8h-source.html#l00925">max_iters</a>, <a class="el" href="ldpc_8h-source.html#l00927">pisc</a>, and <a class="el" href="ldpc_8h-source.html#l00926">psc</a>.</p>
605
606</div>
607</div><p>
608<a class="anchor" name="a7dda5d95ea5b2e1967f7530089e2686"></a><!-- doxytag: member="itpp::LDPC_Code::syndrome_check" ref="a7dda5d95ea5b2e1967f7530089e2686" args="(const QLLRvec &amp;LLR) const " -->
609<div class="memitem">
610<div class="memproto">
611      <table class="memname">
612        <tr>
613          <td class="memname">bool itpp::LDPC_Code::syndrome_check           </td>
614          <td>(</td>
615          <td class="paramtype">const QLLRvec &amp;&nbsp;</td>
616          <td class="paramname"> <em>LLR</em>          </td>
617          <td>&nbsp;)&nbsp;</td>
618          <td> const</td>
619        </tr>
620      </table>
621</div>
622<div class="memdoc">
623
624<p>
625Syndrome check, on QLLR vector.
626<p>
627This function performs a syndrome check on a softbit (LLR vector). The function returns true for a valid codeword, false else.<p>
628<dl compact><dt><b>Parameters:</b></dt><dd>
629  <table border="0" cellspacing="2" cellpadding="0">
630    <tr><td valign="top"></td><td valign="top"><em>LLR</em>&nbsp;</td><td>LLR-vector to check </td></tr>
631  </table>
632</dl>
633
634<p>References <a class="el" href="ldpc_8h-source.html#l00920">ncheck</a>.</p>
635
636<p>Referenced by <a class="el" href="ldpc_8cpp-source.html#l01386">bp_decode()</a>, <a class="el" href="ldpc_8cpp-source.html#l01340">encode()</a>, <a class="el" href="ldpc_8cpp-source.html#l01959">integrity_check()</a>, and <a class="el" href="ldpc_8cpp-source.html#l01846">syndrome_check()</a>.</p>
637
638</div>
639</div><p>
640<hr><h2>Friends And Related Function Documentation</h2>
641<a class="anchor" name="98ccdcb0c1e67513c9e65539ef777f96"></a><!-- doxytag: member="itpp::LDPC_Code::operator&lt;&lt;" ref="98ccdcb0c1e67513c9e65539ef777f96" args="(std::ostream &amp;os, const LDPC_Code &amp;C)" -->
642<div class="memitem">
643<div class="memproto">
644      <table class="memname">
645        <tr>
646          <td class="memname">std::ostream &amp; operator&lt;&lt;           </td>
647          <td>(</td>
648          <td class="paramtype">std::ostream &amp;&nbsp;</td>
649          <td class="paramname"> <em>os</em>, </td>
650        </tr>
651        <tr>
652          <td class="paramkey"></td>
653          <td></td>
654          <td class="paramtype">const <a class="el" href="classitpp_1_1LDPC__Code.html">LDPC_Code</a> &amp;&nbsp;</td>
655          <td class="paramname"> <em>C</em></td><td>&nbsp;</td>
656        </tr>
657        <tr>
658          <td></td>
659          <td>)</td>
660          <td></td><td></td><td><code> [friend]</code></td>
661        </tr>
662      </table>
663</div>
664<div class="memdoc">
665
666<p>
667Print some properties of the codec in plain text.
668<p>
669Print some properties of the LDPC codec in plain text.
670</div>
671</div><p>
672<hr>The documentation for this class was generated from the following files:<ul>
673<li><a class="el" href="ldpc_8h-source.html">ldpc.h</a><li><a class="el" href="ldpc_8cpp.html">ldpc.cpp</a></ul>
674</div>
675<hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:02:19 2009 for mixpp by&nbsp;
676<a href="http://www.doxygen.org/index.html">
677<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
678</body>
679</html>
Note: See TracBrowser for help on using the browser.