root/doc/html/classitpp_1_1LDPC__Parity__Unstructured.html @ 354

Revision 353, 33.7 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_Parity_Unstructured 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__Parity__Unstructured.html">LDPC_Parity_Unstructured</a>
68  </div>
69</div>
70<div class="contents">
71<h1>itpp::LDPC_Parity_Unstructured Class Reference</h1><!-- doxytag: class="itpp::LDPC_Parity_Unstructured" --><!-- doxytag: inherits="itpp::LDPC_Parity" -->Pure abstract class for unstructured LDPC matrices. 
72<a href="#_details">More...</a>
73<p>
74<code>#include &lt;<a class="el" href="ldpc_8h-source.html">ldpc.h</a>&gt;</code>
75<p>
76
77<p>
78<a href="classitpp_1_1LDPC__Parity__Unstructured-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
79<tr><td></td></tr>
80<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
81<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dfc18dacad1de210bb284afbf4dd6de2"></a><!-- doxytag: member="itpp::LDPC_Parity_Unstructured::display_stats" ref="dfc18dacad1de210bb284afbf4dd6de2" args="() const =0" -->
82virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Parity__Unstructured.html#dfc18dacad1de210bb284afbf4dd6de2">display_stats</a> () const =0</td></tr>
83
84<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Display some information about the matrix. <br></td></tr>
85<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Parity__Unstructured.html#32dc0098889fb7cbe925122a220ba504">cycle_removal_MGW</a> (int L)</td></tr>
86
87<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Remove cycles (loops) from unstructured parity check matrix.  <a href="#32dc0098889fb7cbe925122a220ba504"></a><br></td></tr>
88<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f43eb94744828d0203ecef66f10ea252"></a><!-- doxytag: member="itpp::LDPC_Parity_Unstructured::initialize" ref="f43eb94744828d0203ecef66f10ea252" args="(int ncheck, int nvar)" -->
89void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Parity.html#f43eb94744828d0203ecef66f10ea252">initialize</a> (int <a class="el" href="classitpp_1_1LDPC__Parity.html#82403ae65de864fdbe4fcdd4d83caff2">ncheck</a>, int <a class="el" href="classitpp_1_1LDPC__Parity.html#7e8697111c53562022e2f367593366c7">nvar</a>)</td></tr>
90
91<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialize an empty matrix of size ncheck x nvar. <br></td></tr>
92<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5943f4ca9d8b00dca5fd85f603b4b1c0"></a><!-- doxytag: member="itpp::LDPC_Parity_Unstructured::get_H" ref="5943f4ca9d8b00dca5fd85f603b4b1c0" args="(bool transpose=false) const " -->
93<a class="el" href="classitpp_1_1Sparse__Mat.html">GF2mat_sparse</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Parity.html#5943f4ca9d8b00dca5fd85f603b4b1c0">get_H</a> (bool transpose=false) const </td></tr>
94
95<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the parity check matrix, optionally its transposed form. <br></td></tr>
96<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b033b6ca4ab2b951cc503e05d6c9a61b"></a><!-- doxytag: member="itpp::LDPC_Parity_Unstructured::get_col" ref="b033b6ca4ab2b951cc503e05d6c9a61b" args="(int c) const " -->
97<a class="el" href="classitpp_1_1Sparse__Vec.html">Sparse_Vec</a>&lt; <a class="el" href="classitpp_1_1bin.html">bin</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Parity.html#b033b6ca4ab2b951cc503e05d6c9a61b">get_col</a> (int c) const </td></tr>
98
99<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a specific column from the matrix. <br></td></tr>
100<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2740d5f207c00bbcfcd610d9aa96527e"></a><!-- doxytag: member="itpp::LDPC_Parity_Unstructured::get_row" ref="2740d5f207c00bbcfcd610d9aa96527e" args="(int r) const " -->
101<a class="el" href="classitpp_1_1Sparse__Vec.html">Sparse_Vec</a>&lt; <a class="el" href="classitpp_1_1bin.html">bin</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Parity.html#2740d5f207c00bbcfcd610d9aa96527e">get_row</a> (int r) const </td></tr>
102
103<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a specific row from the matrix. <br></td></tr>
104<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7e63f3e0488b7c8b0402b7ca2b659f14"></a><!-- doxytag: member="itpp::LDPC_Parity_Unstructured::get_nvar" ref="7e63f3e0488b7c8b0402b7ca2b659f14" args="() const " -->
105int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Parity.html#7e63f3e0488b7c8b0402b7ca2b659f14">get_nvar</a> () const </td></tr>
106
107<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the number of variable nodes (number of columns). <br></td></tr>
108<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="187f147ffeca6c2744235cbf27ce22f3"></a><!-- doxytag: member="itpp::LDPC_Parity_Unstructured::get_ncheck" ref="187f147ffeca6c2744235cbf27ce22f3" args="() const " -->
109int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Parity.html#187f147ffeca6c2744235cbf27ce22f3">get_ncheck</a> () const </td></tr>
110
111<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the number of check nodes (number of rows). <br></td></tr>
112<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9847b116e69bd7edcaef3704d5b997f8"></a><!-- doxytag: member="itpp::LDPC_Parity_Unstructured::set" ref="9847b116e69bd7edcaef3704d5b997f8" args="(int i, int j, bin value)" -->
113void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Parity.html#9847b116e69bd7edcaef3704d5b997f8">set</a> (int i, int j, <a class="el" href="classitpp_1_1bin.html">bin</a> value)</td></tr>
114
115<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set element (i,j) of the parity check matrix to value. <br></td></tr>
116<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c70ddfe8b703d1eb4d22a19f10f0e8c9"></a><!-- doxytag: member="itpp::LDPC_Parity_Unstructured::get" ref="c70ddfe8b703d1eb4d22a19f10f0e8c9" args="(int i, int j) const " -->
117<a class="el" href="classitpp_1_1bin.html">bin</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Parity.html#c70ddfe8b703d1eb4d22a19f10f0e8c9">get</a> (int i, int j) const </td></tr>
118
119<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get element (i,j) of the parity check matrix. <br></td></tr>
120<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2b2923d5f0ffafe41a427326f34c8784"></a><!-- doxytag: member="itpp::LDPC_Parity_Unstructured::operator()" ref="2b2923d5f0ffafe41a427326f34c8784" args="(int i, int j) const " -->
121<a class="el" href="classitpp_1_1bin.html">bin</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Parity.html#2b2923d5f0ffafe41a427326f34c8784">operator()</a> (int i, int j) const </td></tr>
122
123<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get element (i,j) of the parity check matrix. <br></td></tr>
124<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="35bd2abd71714312866811d3255d68c8"></a><!-- doxytag: member="itpp::LDPC_Parity_Unstructured::get_rate" ref="35bd2abd71714312866811d3255d68c8" args="() const " -->
125double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Parity.html#35bd2abd71714312866811d3255d68c8">get_rate</a> () const </td></tr>
126
127<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the code rate. <br></td></tr>
128<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4e1fd0b2147b5d486e24538615e1fbf4"></a><!-- doxytag: member="itpp::LDPC_Parity_Unstructured::import_alist" ref="4e1fd0b2147b5d486e24538615e1fbf4" args="(const GF2mat_sparse_alist &amp;H_alist)" -->
129void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Parity.html#4e1fd0b2147b5d486e24538615e1fbf4">import_alist</a> (const <a class="el" href="classitpp_1_1GF2mat__sparse__alist.html">GF2mat_sparse_alist</a> &amp;H_alist)</td></tr>
130
131<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Import matrix from <code><a class="el" href="classitpp_1_1GF2mat__sparse__alist.html" title="Parameterized &quot;alist&quot; representation of sparse GF(2) matrix.">GF2mat_sparse_alist</a></code> format. <br></td></tr>
132<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="811f5be45f91edf337d1ec48a125f2a7"></a><!-- doxytag: member="itpp::LDPC_Parity_Unstructured::export_alist" ref="811f5be45f91edf337d1ec48a125f2a7" args="() const " -->
133<a class="el" href="classitpp_1_1GF2mat__sparse__alist.html">GF2mat_sparse_alist</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Parity.html#811f5be45f91edf337d1ec48a125f2a7">export_alist</a> () const </td></tr>
134
135<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Export matrix to <code><a class="el" href="classitpp_1_1GF2mat__sparse__alist.html" title="Parameterized &quot;alist&quot; representation of sparse GF(2) matrix.">GF2mat_sparse_alist</a></code> format. <br></td></tr>
136<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0a8956859defe1d19e79441b9da281b3"></a><!-- doxytag: member="itpp::LDPC_Parity_Unstructured::load_alist" ref="0a8956859defe1d19e79441b9da281b3" args="(const std::string &amp;alist_file)" -->
137void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Parity.html#0a8956859defe1d19e79441b9da281b3">load_alist</a> (const std::string &amp;alist_file)</td></tr>
138
139<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Load matrix from <code>alist_file</code> text file in alist format. <br></td></tr>
140<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f653d919cb8c3d08e2d700809155999a"></a><!-- doxytag: member="itpp::LDPC_Parity_Unstructured::save_alist" ref="f653d919cb8c3d08e2d700809155999a" args="(const std::string &amp;alist_file) const " -->
141void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Parity.html#f653d919cb8c3d08e2d700809155999a">save_alist</a> (const std::string &amp;alist_file) const </td></tr>
142
143<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Save matrix to <code>alist_file</code> text file in alist format. <br></td></tr>
144<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
145<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="65d83d2aa65aa098b10341da4adba70e"></a><!-- doxytag: member="itpp::LDPC_Parity_Unstructured::generate_random_H" ref="65d83d2aa65aa098b10341da4adba70e" args="(const ivec &amp;C, const ivec &amp;R, const ivec &amp;cycopt)" -->
146void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Parity__Unstructured.html#65d83d2aa65aa098b10341da4adba70e">generate_random_H</a> (const ivec &amp;C, const ivec &amp;R, const ivec &amp;cycopt)</td></tr>
147
148<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Generate a random parity check matrix. <br></td></tr>
149<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Parity__Unstructured.html#143f0a5c1def918e21fe30bcd5af176c">compute_CR</a> (const vec &amp;var_deg, const vec &amp;chk_deg, const int Nvar, ivec &amp;C, ivec &amp;R)</td></tr>
150
151<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compute target number of columns (C) and rows (R) with a specific number of ones.  <a href="#143f0a5c1def918e21fe30bcd5af176c"></a><br></td></tr>
152<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Parity.html#2849e24a0089c0b62105b8bbc4072d0e">check_for_cycles</a> (int L) const </td></tr>
153
154<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check for cycles of length L.  <a href="#2849e24a0089c0b62105b8bbc4072d0e"></a><br></td></tr>
155<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Parity.html#d30f8e78f5e951be44660d0750b70cb6">check_connectivity</a> (int from_m, int from_n, int to_m, int to_n, int g, int L) const </td></tr>
156
157<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check for connectivity between nodes.  <a href="#d30f8e78f5e951be44660d0750b70cb6"></a><br></td></tr>
158<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
159<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="74998d26a4dd6057f3a8be6ac4f2c5c1"></a><!-- doxytag: member="itpp::LDPC_Parity_Unstructured::init_flag" ref="74998d26a4dd6057f3a8be6ac4f2c5c1" args="" -->
160bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Parity.html#74998d26a4dd6057f3a8be6ac4f2c5c1">init_flag</a></td></tr>
161
162<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flag that indicates proper initialization. <br></td></tr>
163<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f51c1108ec92883ef46a55083e7263ec"></a><!-- doxytag: member="itpp::LDPC_Parity_Unstructured::H" ref="f51c1108ec92883ef46a55083e7263ec" args="" -->
164<a class="el" href="classitpp_1_1Sparse__Mat.html">GF2mat_sparse</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Parity.html#f51c1108ec92883ef46a55083e7263ec">H</a></td></tr>
165
166<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The parity check matrix. <br></td></tr>
167<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0355499a802f0aeb3cb1b5f720fdc924"></a><!-- doxytag: member="itpp::LDPC_Parity_Unstructured::Ht" ref="0355499a802f0aeb3cb1b5f720fdc924" args="" -->
168<a class="el" href="classitpp_1_1Sparse__Mat.html">GF2mat_sparse</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Parity.html#0355499a802f0aeb3cb1b5f720fdc924">Ht</a></td></tr>
169
170<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The transposed parity check matrix. <br></td></tr>
171<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7e8697111c53562022e2f367593366c7"></a><!-- doxytag: member="itpp::LDPC_Parity_Unstructured::nvar" ref="7e8697111c53562022e2f367593366c7" args="" -->
172int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Parity.html#7e8697111c53562022e2f367593366c7">nvar</a></td></tr>
173
174<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Number of variable nodes. <br></td></tr>
175<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="82403ae65de864fdbe4fcdd4d83caff2"></a><!-- doxytag: member="itpp::LDPC_Parity_Unstructured::ncheck" ref="82403ae65de864fdbe4fcdd4d83caff2" args="" -->
176int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Parity.html#82403ae65de864fdbe4fcdd4d83caff2">ncheck</a></td></tr>
177
178<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Number of check nodes. <br></td></tr>
179<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d57f9e546f3a50b1dd84a587e36562fc"></a><!-- doxytag: member="itpp::LDPC_Parity_Unstructured::sumX1" ref="d57f9e546f3a50b1dd84a587e36562fc" args="" -->
180ivec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Parity.html#d57f9e546f3a50b1dd84a587e36562fc">sumX1</a></td></tr>
181
182<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Actual number of ones in each column. <br></td></tr>
183<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4c4347f86ad11c0f303f52a5134e851c"></a><!-- doxytag: member="itpp::LDPC_Parity_Unstructured::sumX2" ref="4c4347f86ad11c0f303f52a5134e851c" args="" -->
184ivec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Parity.html#4c4347f86ad11c0f303f52a5134e851c">sumX2</a></td></tr>
185
186<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Actual number of ones in each row. <br></td></tr>
187<tr><td colspan="2"><br><h2>Static Protected Attributes</h2></td></tr>
188<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0114010da4b27165cfc748f23d15edeb"></a><!-- doxytag: member="itpp::LDPC_Parity_Unstructured::Nmax" ref="0114010da4b27165cfc748f23d15edeb" args="" -->
189static const int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LDPC__Parity.html#0114010da4b27165cfc748f23d15edeb">Nmax</a> = 200</td></tr>
190
191<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Maximum node degree class can handle. <br></td></tr>
192</table>
193<hr><a name="_details"></a><h2>Detailed Description</h2>
194Pure abstract class for unstructured LDPC matrices.
195<p>
196This class provides a common set of methods for unstructured LDPC matrices. For unstructured codes the parity checks are distributed at random rather than according to a specific pattern, and the generation of a parity matrix can be viewed as drawing a random sample from an ensemble of graphs (matrices) that are described by a specific degree distribution.<p>
197This class is used as base for the <code><a class="el" href="classitpp_1_1LDPC__Parity__Irregular.html" title="Irregular LDPC code generator class.">LDPC_Parity_Irregular</a></code> and <code><a class="el" href="classitpp_1_1LDPC__Parity__Regular.html" title="Regular LDPC code generator class.">LDPC_Parity_Regular</a></code> generator classes.<p>
198<dl class="author" compact><dt><b>Author:</b></dt><dd>Erik G. Larsson, Mattias Andersson and Adam Piatyszek </dd></dl>
199<hr><h2>Member Function Documentation</h2>
200<a class="anchor" name="d30f8e78f5e951be44660d0750b70cb6"></a><!-- doxytag: member="itpp::LDPC_Parity_Unstructured::check_connectivity" ref="d30f8e78f5e951be44660d0750b70cb6" args="(int from_m, int from_n, int to_m, int to_n, int g, int L) const " -->
201<div class="memitem">
202<div class="memproto">
203      <table class="memname">
204        <tr>
205          <td class="memname">int itpp::LDPC_Parity::check_connectivity           </td>
206          <td>(</td>
207          <td class="paramtype">int&nbsp;</td>
208          <td class="paramname"> <em>from_m</em>, </td>
209        </tr>
210        <tr>
211          <td class="paramkey"></td>
212          <td></td>
213          <td class="paramtype">int&nbsp;</td>
214          <td class="paramname"> <em>from_n</em>, </td>
215        </tr>
216        <tr>
217          <td class="paramkey"></td>
218          <td></td>
219          <td class="paramtype">int&nbsp;</td>
220          <td class="paramname"> <em>to_m</em>, </td>
221        </tr>
222        <tr>
223          <td class="paramkey"></td>
224          <td></td>
225          <td class="paramtype">int&nbsp;</td>
226          <td class="paramname"> <em>to_n</em>, </td>
227        </tr>
228        <tr>
229          <td class="paramkey"></td>
230          <td></td>
231          <td class="paramtype">int&nbsp;</td>
232          <td class="paramname"> <em>g</em>, </td>
233        </tr>
234        <tr>
235          <td class="paramkey"></td>
236          <td></td>
237          <td class="paramtype">int&nbsp;</td>
238          <td class="paramname"> <em>L</em></td><td>&nbsp;</td>
239        </tr>
240        <tr>
241          <td></td>
242          <td>)</td>
243          <td></td><td></td><td> const<code> [protected, inherited]</code></td>
244        </tr>
245      </table>
246</div>
247<div class="memdoc">
248
249<p>
250Check for connectivity between nodes.
251<p>
252This function examines whether the point (to_m, to_n) in the matrix can be reached from the point (from_m, from_n) using at most L steps. A recursive search is used.<p>
253The function can be used to search for cycles in the matrix. To search for a cycle of length L, set from_m=to_m and from_n=to_n, and godir=0.<p>
254<dl compact><dt><b>Parameters:</b></dt><dd>
255  <table border="0" cellspacing="2" cellpadding="0">
256    <tr><td valign="top"></td><td valign="top"><em>from_m</em>&nbsp;</td><td>starting coordinate, row number </td></tr>
257    <tr><td valign="top"></td><td valign="top"><em>to_m</em>&nbsp;</td><td>goal coordinate, row number </td></tr>
258    <tr><td valign="top"></td><td valign="top"><em>from_n</em>&nbsp;</td><td>starting coordinate, column number </td></tr>
259    <tr><td valign="top"></td><td valign="top"><em>to_n</em>&nbsp;</td><td>goal coordinate, row number </td></tr>
260    <tr><td valign="top"></td><td valign="top"><em>g</em>&nbsp;</td><td>direction: 1=start going vertically, 2=start going horizontally </td></tr>
261    <tr><td valign="top"></td><td valign="top"><em>L</em>&nbsp;</td><td>number of permitted steps</td></tr>
262  </table>
263</dl>
264<dl class="return" compact><dt><b>Returns:</b></dt><dd><ul>
265<li>-1 or -3 : destination unreachable</li><li>-2 : meaningless search (started in a "0" point),</li><li>-4 : meaningless search</li><li>&gt;=0 : destination reached with certain number of steps left</li></ul>
266</dd></dl>
267<dl class="note" compact><dt><b>Note:</b></dt><dd>This function can be very slow depending on the nature of the matrix.</dd></dl>
268Note that smaller cycles may appear as longer cycles when using this method. More specifically, suppose the method is run with a given L and there are cycles in the neighborhood of (from_m,from_n) of length L-2 or less, but which do not contain (from_m,from_n). These shorter cycles may then also be reported as a cycle of length L. For example, if one of the immediate neighbors of (from_m,from_n) is part of a cycle of length 4 this method will report that (from_m,from_n) is part of a cycle of length 6, if run with L=6. However, if it is known that there are no cycles of length L-2 or smaller, and check_connectivity(from_m,from_n,from_m,from_n,0,L) returns a non-negative value, then one will know with certainty that the point (from_m,from_n) is part of a cycle of length L. (This behavior is inherent to the simple recursive search used.)
269<p>References <a class="el" href="ldpc_8h-source.html#l00108">itpp::LDPC_Parity::get_col()</a>, <a class="el" href="svec_8h-source.html#l00789">itpp::Sparse_Vec&lt; T &gt;::get_nz_indices()</a>, <a class="el" href="ldpc_8h-source.html#l00111">itpp::LDPC_Parity::get_row()</a>, <a class="el" href="ldpc_8h-source.html#l00169">itpp::LDPC_Parity::init_flag</a>, <a class="el" href="itassert_8h-source.html#l00094">it_assert</a>, and <a class="el" href="matfunc_8h-source.html#l00051">itpp::length()</a>.</p>
270
271<p>Referenced by <a class="el" href="ldpc_8cpp-source.html#l00249">itpp::LDPC_Parity::check_for_cycles()</a>, and <a class="el" href="ldpc_8cpp-source.html#l00462">generate_random_H()</a>.</p>
272
273</div>
274</div><p>
275<a class="anchor" name="2849e24a0089c0b62105b8bbc4072d0e"></a><!-- doxytag: member="itpp::LDPC_Parity_Unstructured::check_for_cycles" ref="2849e24a0089c0b62105b8bbc4072d0e" args="(int L) const " -->
276<div class="memitem">
277<div class="memproto">
278      <table class="memname">
279        <tr>
280          <td class="memname">int itpp::LDPC_Parity::check_for_cycles           </td>
281          <td>(</td>
282          <td class="paramtype">int&nbsp;</td>
283          <td class="paramname"> <em>L</em>          </td>
284          <td>&nbsp;)&nbsp;</td>
285          <td> const<code> [protected, inherited]</code></td>
286        </tr>
287      </table>
288</div>
289<div class="memdoc">
290
291<p>
292Check for cycles of length L.
293<p>
294This function implements a recursive routine to find loops. The function is mainly a tool for testing and debugging more sophisticated functions for graph manipulation.<p>
295<dl compact><dt><b>Parameters:</b></dt><dd>
296  <table border="0" cellspacing="2" cellpadding="0">
297    <tr><td valign="top"></td><td valign="top"><em>L</em>&nbsp;</td><td>length of cycles to look for</td></tr>
298  </table>
299</dl>
300<dl class="return" compact><dt><b>Returns:</b></dt><dd>The function returns the number of cycles found of length L or shorter. Cycles may be counted multiple times.</dd></dl>
301<dl class="note" compact><dt><b>Note:</b></dt><dd>This function can be very slow for large matrices. It is mainly intended as a debugging aid. </dd></dl>
302
303<p>References <a class="el" href="ldpc_8cpp-source.html#l00192">itpp::LDPC_Parity::check_connectivity()</a>, <a class="el" href="ldpc_8h-source.html#l00108">itpp::LDPC_Parity::get_col()</a>, <a class="el" href="svec_8h-source.html#l00789">itpp::Sparse_Vec&lt; T &gt;::get_nz_indices()</a>, <a class="el" href="ldpc_8h-source.html#l00169">itpp::LDPC_Parity::init_flag</a>, <a class="el" href="itassert_8h-source.html#l00094">it_assert</a>, <a class="el" href="matfunc_8h-source.html#l00051">itpp::length()</a>, and <a class="el" href="ldpc_8h-source.html#l00177">itpp::LDPC_Parity::nvar</a>.</p>
304
305</div>
306</div><p>
307<a class="anchor" name="143f0a5c1def918e21fe30bcd5af176c"></a><!-- doxytag: member="itpp::LDPC_Parity_Unstructured::compute_CR" ref="143f0a5c1def918e21fe30bcd5af176c" args="(const vec &amp;var_deg, const vec &amp;chk_deg, const int Nvar, ivec &amp;C, ivec &amp;R)" -->
308<div class="memitem">
309<div class="memproto">
310      <table class="memname">
311        <tr>
312          <td class="memname">void itpp::LDPC_Parity_Unstructured::compute_CR           </td>
313          <td>(</td>
314          <td class="paramtype">const vec &amp;&nbsp;</td>
315          <td class="paramname"> <em>var_deg</em>, </td>
316        </tr>
317        <tr>
318          <td class="paramkey"></td>
319          <td></td>
320          <td class="paramtype">const vec &amp;&nbsp;</td>
321          <td class="paramname"> <em>chk_deg</em>, </td>
322        </tr>
323        <tr>
324          <td class="paramkey"></td>
325          <td></td>
326          <td class="paramtype">const int&nbsp;</td>
327          <td class="paramname"> <em>Nvar</em>, </td>
328        </tr>
329        <tr>
330          <td class="paramkey"></td>
331          <td></td>
332          <td class="paramtype">ivec &amp;&nbsp;</td>
333          <td class="paramname"> <em>C</em>, </td>
334        </tr>
335        <tr>
336          <td class="paramkey"></td>
337          <td></td>
338          <td class="paramtype">ivec &amp;&nbsp;</td>
339          <td class="paramname"> <em>R</em></td><td>&nbsp;</td>
340        </tr>
341        <tr>
342          <td></td>
343          <td>)</td>
344          <td></td><td></td><td><code> [protected]</code></td>
345        </tr>
346      </table>
347</div>
348<div class="memdoc">
349
350<p>
351Compute target number of columns (C) and rows (R) with a specific number of ones.
352<p>
353<dl compact><dt><b>Parameters:</b></dt><dd>
354  <table border="0" cellspacing="2" cellpadding="0">
355    <tr><td valign="top"></td><td valign="top"><em>var_deg</em>&nbsp;</td><td>vector of variable degree distributions, from an edge perspective </td></tr>
356    <tr><td valign="top"></td><td valign="top"><em>chk_deg</em>&nbsp;</td><td>vector of check degree distributions, from an edge perspective </td></tr>
357    <tr><td valign="top"></td><td valign="top"><em>Nvar</em>&nbsp;</td><td>number of variable nodes </td></tr>
358    <tr><td valign="top"></td><td valign="top"><em>C</em>&nbsp;</td><td>number of columns with a specific number of ones </td></tr>
359    <tr><td valign="top"></td><td valign="top"><em>R</em>&nbsp;</td><td>number of rows with a specific number of ones</td></tr>
360  </table>
361</dl>
362The result is passed by reference and saved in C and R.
363<p>References <a class="el" href="specmat_8cpp-source.html#l00039">itpp::find()</a>, <a class="el" href="itassert_8h-source.html#l00163">it_info_debug</a>, <a class="el" href="matfunc_8h-source.html#l00051">itpp::length()</a>, <a class="el" href="specmat_8cpp-source.html#l00114">itpp::linspace()</a>, <a class="el" href="tcp_8h-source.html#l00117">itpp::max()</a>, <a class="el" href="ldpc_8h-source.html#l00171">itpp::LDPC_Parity::Nmax</a>, <a class="el" href="converters_8h-source.html#l00327">itpp::round()</a>, <a class="el" href="matfunc_8h-source.html#l00077">itpp::sum()</a>, <a class="el" href="group__convertfunc.html#ga2c82af9774f45c3554fb03a06f3e28d">itpp::to_ivec()</a>, <a class="el" href="fix__functions_8cpp-source.html#l00036">itpp::to_vec()</a>, and <a class="el" href="group__specmat.html#g9df9aa3553b6a5c07924954b85466cec">itpp::zeros_i()</a>.</p>
364
365<p>Referenced by <a class="el" href="ldpc_8cpp-source.html#l00703">itpp::LDPC_Parity_Irregular::generate()</a>, and <a class="el" href="ldpc_8cpp-source.html#l00667">itpp::LDPC_Parity_Regular::generate()</a>.</p>
366
367</div>
368</div><p>
369<a class="anchor" name="32dc0098889fb7cbe925122a220ba504"></a><!-- doxytag: member="itpp::LDPC_Parity_Unstructured::cycle_removal_MGW" ref="32dc0098889fb7cbe925122a220ba504" args="(int L)" -->
370<div class="memitem">
371<div class="memproto">
372      <table class="memname">
373        <tr>
374          <td class="memname">int itpp::LDPC_Parity_Unstructured::cycle_removal_MGW           </td>
375          <td>(</td>
376          <td class="paramtype">int&nbsp;</td>
377          <td class="paramname"> <em>L</em>          </td>
378          <td>&nbsp;)&nbsp;</td>
379          <td></td>
380        </tr>
381      </table>
382</div>
383<div class="memdoc">
384
385<p>
386Remove cycles (loops) from unstructured parity check matrix.
387<p>
388This function implements the cycle removal algorithm presented by McGowan and Williamson at the IT workshop 2003. The maximum girth of the graph that will be attempted is L. The algorithm is bound to remove all loops of length L, insofar this is possible. I.e., it does not terminate until it is impossible to remove more cycles by swapping two edges.<p>
389<dl compact><dt><b>Parameters:</b></dt><dd>
390  <table border="0" cellspacing="2" cellpadding="0">
391    <tr><td valign="top"></td><td valign="top"><em>L</em>&nbsp;</td><td>Target girth. For example, L=6 attempts to removes all 4-cycles. </td></tr>
392  </table>
393</dl>
394<dl class="return" compact><dt><b>Returns:</b></dt><dd>The girth of the graph, i.e. the length of the shortest cycle. For example, a return value of 6 means that there are no 4-cycles.</dd></dl>
395<dl class="note" compact><dt><b>Note:</b></dt><dd>This algorithm can take a long time to run for large L or large graphs. </dd></dl>
396
397<p>References <a class="el" href="group__convertfunc.html#gb5745fd45c164c8d1e062359d0bf2783">itpp::floor_i()</a>, <a class="el" href="ldpc_8h-source.html#l00108">itpp::LDPC_Parity::get_col()</a>, <a class="el" href="svec_8h-source.html#l00239">itpp::Sparse_Vec&lt; T &gt;::get_nz_index()</a>, <a class="el" href="ldpc_8h-source.html#l00169">itpp::LDPC_Parity::init_flag</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>, <a class="el" href="itassert_8h-source.html#l00163">it_info_debug</a>, <a class="el" href="matfunc_8h-source.html#l00051">itpp::length()</a>, <a class="el" href="ldpc_8h-source.html#l00179">itpp::LDPC_Parity::ncheck</a>, <a class="el" href="svec_8h-source.html#l00151">itpp::Sparse_Vec&lt; T &gt;::nnz()</a>, <a class="el" href="ldpc_8h-source.html#l00177">itpp::LDPC_Parity::nvar</a>, <a class="el" href="random_8h-source.html#l00615">itpp::randi()</a>, <a class="el" href="random_8h-source.html#l00608">itpp::randu()</a>, and <a class="el" href="array_8h-source.html#l00257">itpp::Array&lt; T &gt;::set_size()</a>.</p>
398
399</div>
400</div><p>
401<hr>The documentation for this class was generated from the following files:<ul>
402<li><a class="el" href="ldpc_8h-source.html">ldpc.h</a><li><a class="el" href="ldpc_8cpp.html">ldpc.cpp</a></ul>
403</div>
404<hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:02:19 2009 for mixpp by&nbsp;
405<a href="http://www.doxygen.org/index.html">
406<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
407</body>
408</html>
Note: See TracBrowser for help on using the browser.