root/doc/html/classitpp_1_1GF2mat.html @ 354

Revision 353, 57.0 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::GF2mat 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_1GF2mat.html">GF2mat</a>
68  </div>
69</div>
70<div class="contents">
71<h1>itpp::GF2mat Class Reference</h1><!-- doxytag: class="itpp::GF2mat" -->Class for dense GF(2) matrices. 
72<a href="#_details">More...</a>
73<p>
74<code>#include &lt;<a class="el" href="gf2mat_8h-source.html">gf2mat.h</a>&gt;</code>
75<p>
76
77<p>
78<a href="classitpp_1_1GF2mat-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="dc147212007fc4602868840158b9e1d8"></a><!-- doxytag: member="itpp::GF2mat::GF2mat" ref="dc147212007fc4602868840158b9e1d8" args="()" -->
82&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#dc147212007fc4602868840158b9e1d8">GF2mat</a> ()</td></tr>
83
84<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor (gives an empty 1 x 1 matrix). <br></td></tr>
85<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="404f7ec809c238dfd844e662e05a2969"></a><!-- doxytag: member="itpp::GF2mat::GF2mat" ref="404f7ec809c238dfd844e662e05a2969" args="(int m, int n)" -->
86&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#404f7ec809c238dfd844e662e05a2969">GF2mat</a> (int m, int n)</td></tr>
87
88<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct an empty (all-zero) m x n matrix. <br></td></tr>
89<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d4f4ddca1ba307825b9806cdd2771cfe"></a><!-- doxytag: member="itpp::GF2mat::GF2mat" ref="d4f4ddca1ba307825b9806cdd2771cfe" args="(const GF2mat_sparse &amp;X)" -->
90&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#d4f4ddca1ba307825b9806cdd2771cfe">GF2mat</a> (const <a class="el" href="classitpp_1_1Sparse__Mat.html">GF2mat_sparse</a> &amp;X)</td></tr>
91
92<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct a dense GF(2) matrix from a sparse GF(2) matrix. <br></td></tr>
93<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#60975ad92f8e395f49794382edd5176b">GF2mat</a> (const <a class="el" href="classitpp_1_1Sparse__Mat.html">GF2mat_sparse</a> &amp;X, int m1, int n1, int m2, int n2)</td></tr>
94
95<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor, from subset of sparse GF(2) matrix.  <a href="#60975ad92f8e395f49794382edd5176b"></a><br></td></tr>
96<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#fd579c1830335cfb6603d6ac8ba7b467">GF2mat</a> (const <a class="el" href="classitpp_1_1Sparse__Mat.html">GF2mat_sparse</a> &amp;X, const ivec &amp;columns)</td></tr>
97
98<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor, from subset of sparse GF(2) matrix.  <a href="#fd579c1830335cfb6603d6ac8ba7b467"></a><br></td></tr>
99<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#b0d309b617c200ee22445bb04a14acb4">GF2mat</a> (const bvec &amp;x, bool is_column=true)</td></tr>
100
101<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a dense GF(2) matrix from a single vector.  <a href="#b0d309b617c200ee22445bb04a14acb4"></a><br></td></tr>
102<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8190a65f81b69249f3969fc38a5bc7f0"></a><!-- doxytag: member="itpp::GF2mat::GF2mat" ref="8190a65f81b69249f3969fc38a5bc7f0" args="(const bmat &amp;X)" -->
103&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#8190a65f81b69249f3969fc38a5bc7f0">GF2mat</a> (const <a class="el" href="mat_8h.html#f90acd1af41bf2d1d8a4bb23662fff69">bmat</a> &amp;X)</td></tr>
104
105<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a dense GF(2) matrix from a bmat. <br></td></tr>
106<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d22d6d0dd4b26ba18c7c18b4ab37cf76"></a><!-- doxytag: member="itpp::GF2mat::set_size" ref="d22d6d0dd4b26ba18c7c18b4ab37cf76" args="(int m, int n, bool copy=false)" -->
107void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#d22d6d0dd4b26ba18c7c18b4ab37cf76">set_size</a> (int m, int n, bool copy=false)</td></tr>
108
109<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set size of GF(2) matrix. If copy = true, keep data before resizing. <br></td></tr>
110<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3db5a5d93e6359a1b0214fad87851aa4"></a><!-- doxytag: member="itpp::GF2mat::sparsify" ref="3db5a5d93e6359a1b0214fad87851aa4" args="() const " -->
111<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_1GF2mat.html#3db5a5d93e6359a1b0214fad87851aa4">sparsify</a> () const </td></tr>
112
113<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a sparse GF(2) matrix from a dense GF(2) matrix. <br></td></tr>
114<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9e26adbe8604c441a4308195311c74e6"></a><!-- doxytag: member="itpp::GF2mat::bvecify" ref="9e26adbe8604c441a4308195311c74e6" args="() const " -->
115bvec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#9e26adbe8604c441a4308195311c74e6">bvecify</a> () const </td></tr>
116
117<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a bvec from a GF(2) matrix (must have one column or one row). <br></td></tr>
118<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4a7985b6813c77ae73c369c3c15c0176"></a><!-- doxytag: member="itpp::GF2mat::get" ref="4a7985b6813c77ae73c369c3c15c0176" args="(int i, int j) const " -->
119<a class="el" href="classitpp_1_1bin.html">bin</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#4a7985b6813c77ae73c369c3c15c0176">get</a> (int i, int j) const </td></tr>
120
121<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Getting element. <br></td></tr>
122<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5f4cde098e5caa457bfa6ca5fc9f3859"></a><!-- doxytag: member="itpp::GF2mat::operator()" ref="5f4cde098e5caa457bfa6ca5fc9f3859" args="(int i, int j) const " -->
123<a class="el" href="classitpp_1_1bin.html">bin</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#5f4cde098e5caa457bfa6ca5fc9f3859">operator()</a> (int i, int j) const </td></tr>
124
125<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Getting element. <br></td></tr>
126<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b5fdf9499d92066ba1ae7324f23da2f7"></a><!-- doxytag: member="itpp::GF2mat::set" ref="b5fdf9499d92066ba1ae7324f23da2f7" args="(int i, int j, bin s)" -->
127void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#b5fdf9499d92066ba1ae7324f23da2f7">set</a> (int i, int j, <a class="el" href="classitpp_1_1bin.html">bin</a> s)</td></tr>
128
129<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set element i,j to s (0 or 1). <br></td></tr>
130<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="29311e8786dcfee8133ddb7c4acd86a9"></a><!-- doxytag: member="itpp::GF2mat::addto_element" ref="29311e8786dcfee8133ddb7c4acd86a9" args="(int i, int j, bin s)" -->
131void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#29311e8786dcfee8133ddb7c4acd86a9">addto_element</a> (int i, int j, <a class="el" href="classitpp_1_1bin.html">bin</a> s)</td></tr>
132
133<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add s (0 or 1) to element (i,j). <br></td></tr>
134<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2f5a17948e1b936e3a4930b9496e8706"></a><!-- doxytag: member="itpp::GF2mat::set_col" ref="2f5a17948e1b936e3a4930b9496e8706" args="(int j, bvec x)" -->
135void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#2f5a17948e1b936e3a4930b9496e8706">set_col</a> (int j, bvec x)</td></tr>
136
137<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set column j to a binary vector x. <br></td></tr>
138<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d350cbeb23f2e50210ad111e845a67f8"></a><!-- doxytag: member="itpp::GF2mat::set_row" ref="d350cbeb23f2e50210ad111e845a67f8" args="(int i, bvec x)" -->
139void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#d350cbeb23f2e50210ad111e845a67f8">set_row</a> (int i, bvec x)</td></tr>
140
141<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set row i to a binary vector x. <br></td></tr>
142<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3d83ff2b339911888be0dcca933fcb93"></a><!-- doxytag: member="itpp::GF2mat::is_zero" ref="3d83ff2b339911888be0dcca933fcb93" args="() const " -->
143bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#3d83ff2b339911888be0dcca933fcb93">is_zero</a> () const </td></tr>
144
145<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check whether the matrix is identical to zero. <br></td></tr>
146<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e64fb0a60d9aab8c6b551a51fd017538"></a><!-- doxytag: member="itpp::GF2mat::swap_rows" ref="e64fb0a60d9aab8c6b551a51fd017538" args="(int i, int j)" -->
147void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#e64fb0a60d9aab8c6b551a51fd017538">swap_rows</a> (int i, int j)</td></tr>
148
149<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Swap rows i and j. <br></td></tr>
150<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7bf2d0c5dfb4ecd2fb607d7d75043704"></a><!-- doxytag: member="itpp::GF2mat::swap_cols" ref="7bf2d0c5dfb4ecd2fb607d7d75043704" args="(int i, int j)" -->
151void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#7bf2d0c5dfb4ecd2fb607d7d75043704">swap_cols</a> (int i, int j)</td></tr>
152
153<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Swap columns i and j. <br></td></tr>
154<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#1af4a92b0a1a83f7a555ff51589288d3">permute_rows</a> (ivec &amp;perm, bool I)</td></tr>
155
156<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Multiply from left with permutation matrix (permute rows).  <a href="#1af4a92b0a1a83f7a555ff51589288d3"></a><br></td></tr>
157<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#f2745cfe38e48b46a7361d15c8b80fb2">permute_cols</a> (ivec &amp;perm, bool I)</td></tr>
158
159<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Multiply a matrix from right with a permutation matrix (i.e., permute the columns).  <a href="#f2745cfe38e48b46a7361d15c8b80fb2"></a><br></td></tr>
160<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0a4a28c21ee063263ff4383f7e14abfc"></a><!-- doxytag: member="itpp::GF2mat::transpose" ref="0a4a28c21ee063263ff4383f7e14abfc" args="() const " -->
161<a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#0a4a28c21ee063263ff4383f7e14abfc">transpose</a> () const </td></tr>
162
163<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Transpose. <br></td></tr>
164<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3a7620019de152de4313841e84ae765b"></a><!-- doxytag: member="itpp::GF2mat::get_submatrix" ref="3a7620019de152de4313841e84ae765b" args="(int m1, int n1, int m2, int n2) const " -->
165<a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#3a7620019de152de4313841e84ae765b">get_submatrix</a> (int m1, int n1, int m2, int n2) const </td></tr>
166
167<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Submatrix from (m1,n1) to (m2,n2). <br></td></tr>
168<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="60383414c1f4f5403e2d05cc37a5853f"></a><!-- doxytag: member="itpp::GF2mat::concatenate_horizontal" ref="60383414c1f4f5403e2d05cc37a5853f" args="(const GF2mat &amp;X) const " -->
169<a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#60383414c1f4f5403e2d05cc37a5853f">concatenate_horizontal</a> (const <a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;X) const </td></tr>
170
171<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Concatenate horizontally (append X on the right side of matrix). <br></td></tr>
172<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6b9040e2ff3e2e3cce6222dd13a34ad2"></a><!-- doxytag: member="itpp::GF2mat::concatenate_vertical" ref="6b9040e2ff3e2e3cce6222dd13a34ad2" args="(const GF2mat &amp;X) const " -->
173<a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#6b9040e2ff3e2e3cce6222dd13a34ad2">concatenate_vertical</a> (const <a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;X) const </td></tr>
174
175<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Concatenate vertically (append X underneath). <br></td></tr>
176<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e661183c92a92fdf6933504c29cd24c3"></a><!-- doxytag: member="itpp::GF2mat::get_row" ref="e661183c92a92fdf6933504c29cd24c3" args="(int i) const " -->
177bvec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#e661183c92a92fdf6933504c29cd24c3">get_row</a> (int i) const </td></tr>
178
179<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get row. <br></td></tr>
180<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d7ee5bcfe1501b6c04eec25eb188966c"></a><!-- doxytag: member="itpp::GF2mat::get_col" ref="d7ee5bcfe1501b6c04eec25eb188966c" args="(int j) const " -->
181bvec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#d7ee5bcfe1501b6c04eec25eb188966c">get_col</a> (int j) const </td></tr>
182
183<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get column. <br></td></tr>
184<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b6a8989c8e32688fe36443deb2c1625a"></a><!-- doxytag: member="itpp::GF2mat::density" ref="b6a8989c8e32688fe36443deb2c1625a" args="() const " -->
185double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#b6a8989c8e32688fe36443deb2c1625a">density</a> () const </td></tr>
186
187<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compute the matrix density (fraction of elements equal to "1"). <br></td></tr>
188<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f72dd843c1cfe6641e6234b444131ed3"></a><!-- doxytag: member="itpp::GF2mat::rows" ref="f72dd843c1cfe6641e6234b444131ed3" args="() const " -->
189int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#f72dd843c1cfe6641e6234b444131ed3">rows</a> () const </td></tr>
190
191<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get number of rows. <br></td></tr>
192<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e2f8c9b68b5436626ea7a386ffd5b61f"></a><!-- doxytag: member="itpp::GF2mat::cols" ref="e2f8c9b68b5436626ea7a386ffd5b61f" args="() const " -->
193int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#e2f8c9b68b5436626ea7a386ffd5b61f">cols</a> () const </td></tr>
194
195<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get number of columns. <br></td></tr>
196<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#3c73516894e748568b0821bdff3509e6">add_rows</a> (int i, int j)</td></tr>
197
198<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add (or equivalently, subtract) rows.  <a href="#3c73516894e748568b0821bdff3509e6"></a><br></td></tr>
199<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#b713053039a9fbd5523014439e0bbab8">inverse</a> () const </td></tr>
200
201<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Inversion.  <a href="#b713053039a9fbd5523014439e0bbab8"></a><br></td></tr>
202<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a434aa8694ea49e8e4eaec454e45ff03"></a><!-- doxytag: member="itpp::GF2mat::row_rank" ref="a434aa8694ea49e8e4eaec454e45ff03" args="() const " -->
203int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#a434aa8694ea49e8e4eaec454e45ff03">row_rank</a> () const </td></tr>
204
205<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the number of linearly independent rows. <br></td></tr>
206<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#26c7064112141cc025f200403bda15a7">T_fact</a> (<a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;T, <a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;U, ivec &amp;P) const </td></tr>
207
208<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">TXP factorization.  <a href="#26c7064112141cc025f200403bda15a7"></a><br></td></tr>
209<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#a861b9708967670e25d2165cf827c9dd">T_fact_update_bitflip</a> (<a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;T, <a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;U, ivec &amp;P, int rank, int r, int c) const </td></tr>
210
211<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">TXP factorization update, when bit is flipped.  <a href="#a861b9708967670e25d2165cf827c9dd"></a><br></td></tr>
212<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#43be340ead050d90106836ffe250638b">T_fact_update_addcol</a> (<a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;T, <a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;U, ivec &amp;P, bvec newcol) const </td></tr>
213
214<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">TXP factorization update, when column is added.  <a href="#43be340ead050d90106836ffe250638b"></a><br></td></tr>
215<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2d9ccdb65f49279de9532da57e1f2dd1"></a><!-- doxytag: member="itpp::GF2mat::operator=" ref="2d9ccdb65f49279de9532da57e1f2dd1" args="(const GF2mat &amp;X)" -->
216void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#2d9ccdb65f49279de9532da57e1f2dd1">operator=</a> (const <a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;X)</td></tr>
217
218<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Assignment operator. <br></td></tr>
219<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3c071d473d617585dfabfadc0252c39c"></a><!-- doxytag: member="itpp::GF2mat::operator==" ref="3c071d473d617585dfabfadc0252c39c" args="(const GF2mat &amp;X) const " -->
220bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#3c071d473d617585dfabfadc0252c39c">operator==</a> (const <a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;X) const </td></tr>
221
222<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check if equal. <br></td></tr>
223<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
224<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#c272d2dad7a03fcb4f648a1f04e99c8c">operator*</a> (const <a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;X, const <a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;Y)</td></tr>
225
226<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Multiplication operator.  <a href="#c272d2dad7a03fcb4f648a1f04e99c8c"></a><br></td></tr>
227<tr><td class="memItemLeft" nowrap align="right" valign="top">bvec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#25a2817f97e5946b8fb0d14551387520">operator*</a> (const <a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;X, const bvec &amp;y)</td></tr>
228
229<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Multiplication operator with binary vector.  <a href="#25a2817f97e5946b8fb0d14551387520"></a><br></td></tr>
230<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#f1f13cf996e90cbabbd46e5790b08287">operator+</a> (const <a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;X, const <a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;Y)</td></tr>
231
232<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Addition operator.  <a href="#f1f13cf996e90cbabbd46e5790b08287"></a><br></td></tr>
233<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_1GF2mat.html#189b6e6faee514b7aecaed8894b978ee">operator&lt;&lt;</a> (std::ostream &amp;os, const <a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;X)</td></tr>
234
235<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Output stream operator (plain text).  <a href="#189b6e6faee514b7aecaed8894b978ee"></a><br></td></tr>
236<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classitpp_1_1it__file.html">it_file</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#8fba9e54a6420b61f171d718cb6e1a76">operator&lt;&lt;</a> (<a class="el" href="classitpp_1_1it__file.html">it_file</a> &amp;f, const <a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;X)</td></tr>
237
238<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Write the matrix to file.  <a href="#8fba9e54a6420b61f171d718cb6e1a76"></a><br></td></tr>
239<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classitpp_1_1it__ifile.html">it_ifile</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#a46348071ba4d3116d473e188ef804a1">operator&gt;&gt;</a> (<a class="el" href="classitpp_1_1it__ifile.html">it_ifile</a> &amp;f, <a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;X)</td></tr>
240
241<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read the matrix from file.  <a href="#a46348071ba4d3116d473e188ef804a1"></a><br></td></tr>
242<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="375df4bc73ef802e3face6661d088963"></a><!-- doxytag: member="itpp::GF2mat::mult_trans" ref="375df4bc73ef802e3face6661d088963" args="(const GF2mat &amp;X, const GF2mat &amp;Y)" -->
243<a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#375df4bc73ef802e3face6661d088963">mult_trans</a> (const <a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;X, const <a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;Y)</td></tr>
244
245<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Multiplication X*Y' where X and Y are GF(2) matrices. <br></td></tr>
246<tr><td colspan="2"><br><h2>Related Functions</h2></td></tr>
247<tr><td colspan="2">(Note that these are not member functions.) <br><br></td></tr>
248<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b07585c7d63aeb5a2f6d4dfd9b8333b3"></a><!-- doxytag: member="itpp::GF2mat::gf2dense_eye" ref="b07585c7d63aeb5a2f6d4dfd9b8333b3" args="(int m)" -->
249<a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1GF2mat.html#b07585c7d63aeb5a2f6d4dfd9b8333b3">gf2dense_eye</a> (int m)</td></tr>
250
251<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">GF(2) Identity matrix. <br></td></tr>
252</table>
253<hr><a name="_details"></a><h2>Detailed Description</h2>
254Class for dense GF(2) matrices.
255<p>
256<dl class="author" compact><dt><b>Author:</b></dt><dd>Erik G. Larsson</dd></dl>
257This class can be used as an alternative to <code>bmat</code> to represent GF(2) matrices. It extends the functionality of <code>bmat</code> in two ways:<p>
258<ul>
259<li><code><a class="el" href="classitpp_1_1GF2mat.html" title="Class for dense GF(2) matrices.">GF2mat</a></code> makes more efficient use of computer memory than <code>bmat</code> (one bit in the matrix requires one bit of memory)</li><li><code><a class="el" href="classitpp_1_1GF2mat.html" title="Class for dense GF(2) matrices.">GF2mat</a></code> provides several functions for linear algebra and matrix factorizations</li></ul>
260<p>
261See also <code>GF2mat_sparse</code> which offers an efficient representation of sparse GF(2) matrices, and <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> for a parameterized representation of sparse GF(2) matrices. <hr><h2>Constructor &amp; Destructor Documentation</h2>
262<a class="anchor" name="60975ad92f8e395f49794382edd5176b"></a><!-- doxytag: member="itpp::GF2mat::GF2mat" ref="60975ad92f8e395f49794382edd5176b" args="(const GF2mat_sparse &amp;X, int m1, int n1, int m2, int n2)" -->
263<div class="memitem">
264<div class="memproto">
265      <table class="memname">
266        <tr>
267          <td class="memname">itpp::GF2mat::GF2mat           </td>
268          <td>(</td>
269          <td class="paramtype">const <a class="el" href="classitpp_1_1Sparse__Mat.html">GF2mat_sparse</a> &amp;&nbsp;</td>
270          <td class="paramname"> <em>X</em>, </td>
271        </tr>
272        <tr>
273          <td class="paramkey"></td>
274          <td></td>
275          <td class="paramtype">int&nbsp;</td>
276          <td class="paramname"> <em>m1</em>, </td>
277        </tr>
278        <tr>
279          <td class="paramkey"></td>
280          <td></td>
281          <td class="paramtype">int&nbsp;</td>
282          <td class="paramname"> <em>n1</em>, </td>
283        </tr>
284        <tr>
285          <td class="paramkey"></td>
286          <td></td>
287          <td class="paramtype">int&nbsp;</td>
288          <td class="paramname"> <em>m2</em>, </td>
289        </tr>
290        <tr>
291          <td class="paramkey"></td>
292          <td></td>
293          <td class="paramtype">int&nbsp;</td>
294          <td class="paramname"> <em>n2</em></td><td>&nbsp;</td>
295        </tr>
296        <tr>
297          <td></td>
298          <td>)</td>
299          <td></td><td></td><td></td>
300        </tr>
301      </table>
302</div>
303<div class="memdoc">
304
305<p>
306Constructor, from subset of sparse GF(2) matrix.
307<p>
308This constructor forms a dense GF(2) matrix from a subset (m1,n1) to (m2,n2) of a sparse GF(2) matrix
309<p>References <a class="el" href="smat_8h-source.html#l00164">itpp::Sparse_Mat&lt; T &gt;::cols()</a>, <a class="el" href="itassert_8h-source.html#l00094">it_assert</a>, <a class="el" href="smat_8h-source.html#l00161">itpp::Sparse_Mat&lt; T &gt;::rows()</a>, and <a class="el" href="mat_8h-source.html#l00661">itpp::Mat&lt; Num_T &gt;::set_size()</a>.</p>
310
311</div>
312</div><p>
313<a class="anchor" name="fd579c1830335cfb6603d6ac8ba7b467"></a><!-- doxytag: member="itpp::GF2mat::GF2mat" ref="fd579c1830335cfb6603d6ac8ba7b467" args="(const GF2mat_sparse &amp;X, const ivec &amp;columns)" -->
314<div class="memitem">
315<div class="memproto">
316      <table class="memname">
317        <tr>
318          <td class="memname">itpp::GF2mat::GF2mat           </td>
319          <td>(</td>
320          <td class="paramtype">const <a class="el" href="classitpp_1_1Sparse__Mat.html">GF2mat_sparse</a> &amp;&nbsp;</td>
321          <td class="paramname"> <em>X</em>, </td>
322        </tr>
323        <tr>
324          <td class="paramkey"></td>
325          <td></td>
326          <td class="paramtype">const ivec &amp;&nbsp;</td>
327          <td class="paramname"> <em>columns</em></td><td>&nbsp;</td>
328        </tr>
329        <tr>
330          <td></td>
331          <td>)</td>
332          <td></td><td></td><td></td>
333        </tr>
334      </table>
335</div>
336<div class="memdoc">
337
338<p>
339Constructor, from subset of sparse GF(2) matrix.
340<p>
341This constructor forms a dense GF(2) matrix from a subset of columns in sparse GF(2) matrix<p>
342<dl compact><dt><b>Parameters:</b></dt><dd>
343  <table border="0" cellspacing="2" cellpadding="0">
344    <tr><td valign="top"></td><td valign="top"><em>X</em>&nbsp;</td><td>matrix to copy from </td></tr>
345    <tr><td valign="top"></td><td valign="top"><em>columns</em>&nbsp;</td><td>subset of columns to copy </td></tr>
346  </table>
347</dl>
348
349<p>References <a class="el" href="smat_8h-source.html#l00164">itpp::Sparse_Mat&lt; T &gt;::cols()</a>, <a class="el" href="smat_8h-source.html#l00615">itpp::Sparse_Mat&lt; T &gt;::get_col()</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>, <a class="el" href="tcp_8h-source.html#l00117">itpp::max()</a>, <a class="el" href="tcp_8h-source.html#l00115">itpp::min()</a>, <a class="el" href="smat_8h-source.html#l00161">itpp::Sparse_Mat&lt; T &gt;::rows()</a>, and <a class="el" href="mat_8h-source.html#l00661">itpp::Mat&lt; Num_T &gt;::set_size()</a>.</p>
350
351</div>
352</div><p>
353<a class="anchor" name="b0d309b617c200ee22445bb04a14acb4"></a><!-- doxytag: member="itpp::GF2mat::GF2mat" ref="b0d309b617c200ee22445bb04a14acb4" args="(const bvec &amp;x, bool is_column=true)" -->
354<div class="memitem">
355<div class="memproto">
356      <table class="memname">
357        <tr>
358          <td class="memname">itpp::GF2mat::GF2mat           </td>
359          <td>(</td>
360          <td class="paramtype">const bvec &amp;&nbsp;</td>
361          <td class="paramname"> <em>x</em>, </td>
362        </tr>
363        <tr>
364          <td class="paramkey"></td>
365          <td></td>
366          <td class="paramtype">bool&nbsp;</td>
367          <td class="paramname"> <em>is_column</em> = <code>true</code></td><td>&nbsp;</td>
368        </tr>
369        <tr>
370          <td></td>
371          <td>)</td>
372          <td></td><td></td><td></td>
373        </tr>
374      </table>
375</div>
376<div class="memdoc">
377
378<p>
379Create a dense GF(2) matrix from a single vector.
380<p>
381<dl compact><dt><b>Parameters:</b></dt><dd>
382  <table border="0" cellspacing="2" cellpadding="0">
383    <tr><td valign="top"></td><td valign="top"><em>x</em>&nbsp;</td><td>The input vector </td></tr>
384    <tr><td valign="top"></td><td valign="top"><em>is_column</em>&nbsp;</td><td>A parameter that indicates whether the result should be a row vector (false), or a column vector (true - default) </td></tr>
385  </table>
386</dl>
387
388<p>References <a class="el" href="mat_8h-source.html#l00251">itpp::Mat&lt; Num_T &gt;::clear()</a>, <a class="el" href="matfunc_8h-source.html#l00051">itpp::length()</a>, and <a class="el" href="mat_8h-source.html#l00661">itpp::Mat&lt; Num_T &gt;::set_size()</a>.</p>
389
390</div>
391</div><p>
392<hr><h2>Member Function Documentation</h2>
393<a class="anchor" name="3c73516894e748568b0821bdff3509e6"></a><!-- doxytag: member="itpp::GF2mat::add_rows" ref="3c73516894e748568b0821bdff3509e6" args="(int i, int j)" -->
394<div class="memitem">
395<div class="memproto">
396      <table class="memname">
397        <tr>
398          <td class="memname">void itpp::GF2mat::add_rows           </td>
399          <td>(</td>
400          <td class="paramtype">int&nbsp;</td>
401          <td class="paramname"> <em>i</em>, </td>
402        </tr>
403        <tr>
404          <td class="paramkey"></td>
405          <td></td>
406          <td class="paramtype">int&nbsp;</td>
407          <td class="paramname"> <em>j</em></td><td>&nbsp;</td>
408        </tr>
409        <tr>
410          <td></td>
411          <td>)</td>
412          <td></td><td></td><td></td>
413        </tr>
414      </table>
415</div>
416<div class="memdoc">
417
418<p>
419Add (or equivalently, subtract) rows.
420<p>
421This function updates row i according to row_i = row_i+row_j<p>
422<dl compact><dt><b>Parameters:</b></dt><dd>
423  <table border="0" cellspacing="2" cellpadding="0">
424    <tr><td valign="top"></td><td valign="top"><em>i</em>&nbsp;</td><td>Row to add to. This row will be modified </td></tr>
425    <tr><td valign="top"></td><td valign="top"><em>j</em>&nbsp;</td><td>Row to add. This row will <b>not</b> be modified. </td></tr>
426  </table>
427</dl>
428
429<p>References <a class="el" href="itassert_8h-source.html#l00094">it_assert</a>.</p>
430
431<p>Referenced by <a class="el" href="ldpc_8cpp-source.html#l01088">itpp::BLDPC_Generator::construct()</a>, <a class="el" href="gf2mat_8cpp-source.html#l00748">inverse()</a>, <a class="el" href="gf2mat_8cpp-source.html#l00561">T_fact()</a>, <a class="el" href="gf2mat_8cpp-source.html#l00697">T_fact_update_addcol()</a>, and <a class="el" href="gf2mat_8cpp-source.html#l00614">T_fact_update_bitflip()</a>.</p>
432
433</div>
434</div><p>
435<a class="anchor" name="b713053039a9fbd5523014439e0bbab8"></a><!-- doxytag: member="itpp::GF2mat::inverse" ref="b713053039a9fbd5523014439e0bbab8" args="() const " -->
436<div class="memitem">
437<div class="memproto">
438      <table class="memname">
439        <tr>
440          <td class="memname"><a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> itpp::GF2mat::inverse           </td>
441          <td>(</td>
442          <td class="paramname">          </td>
443          <td>&nbsp;)&nbsp;</td>
444          <td> const</td>
445        </tr>
446      </table>
447</div>
448<div class="memdoc">
449
450<p>
451Inversion.
452<p>
453The matrix must be invertible, otherwise the function will terminate with an error.
454<p>References <a class="el" href="gf2mat_8cpp-source.html#l00809">add_rows()</a>, <a class="el" href="gf2mat_8h-source.html#l00483">get()</a>, <a class="el" href="itassert_8h-source.html#l00094">it_assert</a>, <a class="el" href="gf2mat_8cpp-source.html#l00980">permute_rows()</a>, <a class="el" href="matfunc_8h-source.html#l00531">itpp::rank()</a>, and <a class="el" href="gf2mat_8cpp-source.html#l00561">T_fact()</a>.</p>
455
456<p>Referenced by <a class="el" href="ldpc_8cpp-source.html#l00894">itpp::LDPC_Generator_Systematic::construct()</a>.</p>
457
458</div>
459</div><p>
460<a class="anchor" name="f2745cfe38e48b46a7361d15c8b80fb2"></a><!-- doxytag: member="itpp::GF2mat::permute_cols" ref="f2745cfe38e48b46a7361d15c8b80fb2" args="(ivec &amp;perm, bool I)" -->
461<div class="memitem">
462<div class="memproto">
463      <table class="memname">
464        <tr>
465          <td class="memname">void itpp::GF2mat::permute_cols           </td>
466          <td>(</td>
467          <td class="paramtype">ivec &amp;&nbsp;</td>
468          <td class="paramname"> <em>perm</em>, </td>
469        </tr>
470        <tr>
471          <td class="paramkey"></td>
472          <td></td>
473          <td class="paramtype">bool&nbsp;</td>
474          <td class="paramname"> <em>I</em></td><td>&nbsp;</td>
475        </tr>
476        <tr>
477          <td></td>
478          <td>)</td>
479          <td></td><td></td><td></td>
480        </tr>
481      </table>
482</div>
483<div class="memdoc">
484
485<p>
486Multiply a matrix from right with a permutation matrix (i.e., permute the columns).
487<p>
488<dl compact><dt><b>Parameters:</b></dt><dd>
489  <table border="0" cellspacing="2" cellpadding="0">
490    <tr><td valign="top"></td><td valign="top"><em>perm</em>&nbsp;</td><td>Permutation vector </td></tr>
491    <tr><td valign="top"></td><td valign="top"><em>I</em>&nbsp;</td><td>Parameter that determines permutation. I=0: apply permutation, I=1: apply inverse permutation </td></tr>
492  </table>
493</dl>
494
495<p>References <a class="el" href="gf2mat_8cpp-source.html#l00550">get_col()</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="gf2mat_8cpp-source.html#l00460">set_col()</a>.</p>
496
497</div>
498</div><p>
499<a class="anchor" name="1af4a92b0a1a83f7a555ff51589288d3"></a><!-- doxytag: member="itpp::GF2mat::permute_rows" ref="1af4a92b0a1a83f7a555ff51589288d3" args="(ivec &amp;perm, bool I)" -->
500<div class="memitem">
501<div class="memproto">
502      <table class="memname">
503        <tr>
504          <td class="memname">void itpp::GF2mat::permute_rows           </td>
505          <td>(</td>
506          <td class="paramtype">ivec &amp;&nbsp;</td>
507          <td class="paramname"> <em>perm</em>, </td>
508        </tr>
509        <tr>
510          <td class="paramkey"></td>
511          <td></td>
512          <td class="paramtype">bool&nbsp;</td>
513          <td class="paramname"> <em>I</em></td><td>&nbsp;</td>
514        </tr>
515        <tr>
516          <td></td>
517          <td>)</td>
518          <td></td><td></td><td></td>
519        </tr>
520      </table>
521</div>
522<div class="memdoc">
523
524<p>
525Multiply from left with permutation matrix (permute rows).
526<p>
527<dl compact><dt><b>Parameters:</b></dt><dd>
528  <table border="0" cellspacing="2" cellpadding="0">
529    <tr><td valign="top"></td><td valign="top"><em>perm</em>&nbsp;</td><td>Permutation vector </td></tr>
530    <tr><td valign="top"></td><td valign="top"><em>I</em>&nbsp;</td><td>Parameter that determines permutation. I=0: apply permutation, I=1: apply inverse permutation </td></tr>
531  </table>
532</dl>
533
534<p>References <a class="el" href="gf2mat_8h-source.html#l00406">data</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>
535
536<p>Referenced by <a class="el" href="gf2mat_8cpp-source.html#l00748">inverse()</a>.</p>
537
538</div>
539</div><p>
540<a class="anchor" name="26c7064112141cc025f200403bda15a7"></a><!-- doxytag: member="itpp::GF2mat::T_fact" ref="26c7064112141cc025f200403bda15a7" args="(GF2mat &amp;T, GF2mat &amp;U, ivec &amp;P) const " -->
541<div class="memitem">
542<div class="memproto">
543      <table class="memname">
544        <tr>
545          <td class="memname">int itpp::GF2mat::T_fact           </td>
546          <td>(</td>
547          <td class="paramtype"><a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;&nbsp;</td>
548          <td class="paramname"> <em>T</em>, </td>
549        </tr>
550        <tr>
551          <td class="paramkey"></td>
552          <td></td>
553          <td class="paramtype"><a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;&nbsp;</td>
554          <td class="paramname"> <em>U</em>, </td>
555        </tr>
556        <tr>
557          <td class="paramkey"></td>
558          <td></td>
559          <td class="paramtype">ivec &amp;&nbsp;</td>
560          <td class="paramname"> <em>P</em></td><td>&nbsp;</td>
561        </tr>
562        <tr>
563          <td></td>
564          <td>)</td>
565          <td></td><td></td><td> const</td>
566        </tr>
567      </table>
568</div>
569<div class="memdoc">
570
571<p>
572TXP factorization.
573<p>
574Given X, compute a factorization of the form U=TXP, where U is upper triangular, T is square and invertible, and P is a permutation matrix. This is basically an "LU"-factorization, but not called so here because T is not necessarily lower triangular. The matrix X may have any dimension. The permutation matrix P is represented as a permutation vector.<p>
575The function returns the row rank of X. (If X is full row rank, then the number of rows is returned.)<p>
576The function uses Gaussian elimination combined with permutations. The computational complexity is O(m*m*n) for an m*n matrix.
577<p>References <a class="el" href="gf2mat_8cpp-source.html#l00809">add_rows()</a>, <a class="el" href="group__convertfunc.html#gb5745fd45c164c8d1e062359d0bf2783">itpp::floor_i()</a>, <a class="el" href="gf2mat_8h-source.html#l00483">get()</a>, <a class="el" href="gf2mat_8cpp-source.html#l00470">gf2dense_eye()</a>, <a class="el" href="itassert_8h-source.html#l00163">it_info_debug</a>, <a class="el" href="gf2mat_8cpp-source.html#l00829">swap_cols()</a>, <a class="el" href="gf2mat_8cpp-source.html#l00818">swap_rows()</a>, and <a class="el" href="group__specmat.html#g9df9aa3553b6a5c07924954b85466cec">itpp::zeros_i()</a>.</p>
578
579<p>Referenced by <a class="el" href="ldpc_8cpp-source.html#l00894">itpp::LDPC_Generator_Systematic::construct()</a>, <a class="el" href="gf2mat_8cpp-source.html#l00748">inverse()</a>, and <a class="el" href="gf2mat_8cpp-source.html#l00771">row_rank()</a>.</p>
580
581</div>
582</div><p>
583<a class="anchor" name="43be340ead050d90106836ffe250638b"></a><!-- doxytag: member="itpp::GF2mat::T_fact_update_addcol" ref="43be340ead050d90106836ffe250638b" args="(GF2mat &amp;T, GF2mat &amp;U, ivec &amp;P, bvec newcol) const " -->
584<div class="memitem">
585<div class="memproto">
586      <table class="memname">
587        <tr>
588          <td class="memname">bool itpp::GF2mat::T_fact_update_addcol           </td>
589          <td>(</td>
590          <td class="paramtype"><a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;&nbsp;</td>
591          <td class="paramname"> <em>T</em>, </td>
592        </tr>
593        <tr>
594          <td class="paramkey"></td>
595          <td></td>
596          <td class="paramtype"><a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;&nbsp;</td>
597          <td class="paramname"> <em>U</em>, </td>
598        </tr>
599        <tr>
600          <td class="paramkey"></td>
601          <td></td>
602          <td class="paramtype">ivec &amp;&nbsp;</td>
603          <td class="paramname"> <em>P</em>, </td>
604        </tr>
605        <tr>
606          <td class="paramkey"></td>
607          <td></td>
608          <td class="paramtype">bvec&nbsp;</td>
609          <td class="paramname"> <em>newcol</em></td><td>&nbsp;</td>
610        </tr>
611        <tr>
612          <td></td>
613          <td>)</td>
614          <td></td><td></td><td> const</td>
615        </tr>
616      </table>
617</div>
618<div class="memdoc">
619
620<p>
621TXP factorization update, when column is added.
622<p>
623Update upper triangular factor U in the T-factorization (U=TXP) when a column (newcol) is appended at the right side of the matrix. The purpose of this function is to avoid re-running a complete T-factorization when a column is added. The function ONLY adds the column if it improves the rank of the matrix (nothing is done otherwise). The function returns "true" if the column was added, and "false" otherwise.<p>
624<dl class="note" compact><dt><b>Note:</b></dt><dd>This function does not actually add the column newcol to the GF2 matrix. It only checks whether doing so would increase the rank, and if this is the case, it updates the T-factorization. A typical calling sequence would be <div class="fragment"><pre class="fragment">  <span class="keywordtype">bool</span> rank_will_improve =  X.T_fact_update_addcol(T,U,perm,c);
625  <span class="keywordflow">if</span> (rank_will_improve) { X = X.concatenate_horizontal(c); }
626</pre></div></dd></dl>
627The complexity is O(m^2) for an m*n matrix.
628<p>References <a class="el" href="gf2mat_8cpp-source.html#l00809">add_rows()</a>, <a class="el" href="gf2mat_8h-source.html#l00280">cols()</a>, <a class="el" href="gf2mat_8cpp-source.html#l00519">concatenate_horizontal()</a>, <a class="el" href="gf2mat_8h-source.html#l00483">get()</a>, <a class="el" href="gf2mat_8cpp-source.html#l00288">GF2mat()</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="matfunc_8h-source.html#l00051">itpp::length()</a>, <a class="el" href="gf2mat_8cpp-source.html#l00771">row_rank()</a>, <a class="el" href="gf2mat_8h-source.html#l00277">rows()</a>, and <a class="el" href="gf2mat_8cpp-source.html#l00818">swap_rows()</a>.</p>
629
630<p>Referenced by <a class="el" href="ldpc_8cpp-source.html#l00894">itpp::LDPC_Generator_Systematic::construct()</a>.</p>
631
632</div>
633</div><p>
634<a class="anchor" name="a861b9708967670e25d2165cf827c9dd"></a><!-- doxytag: member="itpp::GF2mat::T_fact_update_bitflip" ref="a861b9708967670e25d2165cf827c9dd" args="(GF2mat &amp;T, GF2mat &amp;U, ivec &amp;P, int rank, int r, int c) const " -->
635<div class="memitem">
636<div class="memproto">
637      <table class="memname">
638        <tr>
639          <td class="memname">int itpp::GF2mat::T_fact_update_bitflip           </td>
640          <td>(</td>
641          <td class="paramtype"><a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;&nbsp;</td>
642          <td class="paramname"> <em>T</em>, </td>
643        </tr>
644        <tr>
645          <td class="paramkey"></td>
646          <td></td>
647          <td class="paramtype"><a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;&nbsp;</td>
648          <td class="paramname"> <em>U</em>, </td>
649        </tr>
650        <tr>
651          <td class="paramkey"></td>
652          <td></td>
653          <td class="paramtype">ivec &amp;&nbsp;</td>
654          <td class="paramname"> <em>P</em>, </td>
655        </tr>
656        <tr>
657          <td class="paramkey"></td>
658          <td></td>
659          <td class="paramtype">int&nbsp;</td>
660          <td class="paramname"> <em>rank</em>, </td>
661        </tr>
662        <tr>
663          <td class="paramkey"></td>
664          <td></td>
665          <td class="paramtype">int&nbsp;</td>
666          <td class="paramname"> <em>r</em>, </td>
667        </tr>
668        <tr>
669          <td class="paramkey"></td>
670          <td></td>
671          <td class="paramtype">int&nbsp;</td>
672          <td class="paramname"> <em>c</em></td><td>&nbsp;</td>
673        </tr>
674        <tr>
675          <td></td>
676          <td>)</td>
677          <td></td><td></td><td> const</td>
678        </tr>
679      </table>
680</div>
681<div class="memdoc">
682
683<p>
684TXP factorization update, when bit is flipped.
685<p>
686Update upper triangular factor U in the TXP-factorization (U=TXP) when the bit at position (r,c) is changed (0-&gt;1 or 1-&gt;0). The purpose of this function is to avoid re-running a complete T-factorization when a single bit is changed. The function assumes that T, U, and P already exist and that U=TXP before the function is called. The function also assumes that the rank provided is correct. The function updates T, U and P these matrices. The function returns the new rank of the matrix after the bitflip.<p>
687<dl class="note" compact><dt><b>Note:</b></dt><dd>T, U, P and the rank value supplied to the function must be correct one. This is not checked by the function (for reasons of efficiency).</dd></dl>
688The function works by performing permutations to bring the matrix to a form where the Gaussian eliminated can be restarted from the point (rank-1,rank-1). The function is very fast for matrices with close to full rank but it is generally slower for non-full rank matrices.
689<p>References <a class="el" href="gf2mat_8cpp-source.html#l00809">add_rows()</a>, <a class="el" href="gf2mat_8h-source.html#l00475">addto_element()</a>, <a class="el" href="gf2mat_8h-source.html#l00483">get()</a>, <a class="el" href="gf2mat_8cpp-source.html#l00550">get_col()</a>, <a class="el" href="gf2mat_8cpp-source.html#l00540">get_row()</a>, <a class="el" href="itassert_8h-source.html#l00126">it_error</a>, <a class="el" href="gf2mat_8cpp-source.html#l00460">set_col()</a>, <a class="el" href="gf2mat_8cpp-source.html#l00451">set_row()</a>, <a class="el" href="gf2mat_8cpp-source.html#l00829">swap_cols()</a>, and <a class="el" href="gf2mat_8cpp-source.html#l00818">swap_rows()</a>.</p>
690
691</div>
692</div><p>
693<hr><h2>Friends And Related Function Documentation</h2>
694<a class="anchor" name="25a2817f97e5946b8fb0d14551387520"></a><!-- doxytag: member="itpp::GF2mat::operator*" ref="25a2817f97e5946b8fb0d14551387520" args="(const GF2mat &amp;X, const bvec &amp;y)" -->
695<div class="memitem">
696<div class="memproto">
697      <table class="memname">
698        <tr>
699          <td class="memname">bvec operator*           </td>
700          <td>(</td>
701          <td class="paramtype">const <a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;&nbsp;</td>
702          <td class="paramname"> <em>X</em>, </td>
703        </tr>
704        <tr>
705          <td class="paramkey"></td>
706          <td></td>
707          <td class="paramtype">const bvec &amp;&nbsp;</td>
708          <td class="paramname"> <em>y</em></td><td>&nbsp;</td>
709        </tr>
710        <tr>
711          <td></td>
712          <td>)</td>
713          <td></td><td></td><td><code> [friend]</code></td>
714        </tr>
715      </table>
716</div>
717<div class="memdoc">
718
719<p>
720Multiplication operator with binary vector.
721<p>
722GF(2) matrix multiplication with "regular" binary vector.
723</div>
724</div><p>
725<a class="anchor" name="c272d2dad7a03fcb4f648a1f04e99c8c"></a><!-- doxytag: member="itpp::GF2mat::operator*" ref="c272d2dad7a03fcb4f648a1f04e99c8c" args="(const GF2mat &amp;X, const GF2mat &amp;Y)" -->
726<div class="memitem">
727<div class="memproto">
728      <table class="memname">
729        <tr>
730          <td class="memname"><a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> operator*           </td>
731          <td>(</td>
732          <td class="paramtype">const <a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;&nbsp;</td>
733          <td class="paramname"> <em>X</em>, </td>
734        </tr>
735        <tr>
736          <td class="paramkey"></td>
737          <td></td>
738          <td class="paramtype">const <a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;&nbsp;</td>
739          <td class="paramname"> <em>Y</em></td><td>&nbsp;</td>
740        </tr>
741        <tr>
742          <td></td>
743          <td>)</td>
744          <td></td><td></td><td><code> [friend]</code></td>
745        </tr>
746      </table>
747</div>
748<div class="memdoc">
749
750<p>
751Multiplication operator.
752<p>
753GF(2) matrix multiplication.
754</div>
755</div><p>
756<a class="anchor" name="f1f13cf996e90cbabbd46e5790b08287"></a><!-- doxytag: member="itpp::GF2mat::operator+" ref="f1f13cf996e90cbabbd46e5790b08287" args="(const GF2mat &amp;X, const GF2mat &amp;Y)" -->
757<div class="memitem">
758<div class="memproto">
759      <table class="memname">
760        <tr>
761          <td class="memname"><a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> operator+           </td>
762          <td>(</td>
763          <td class="paramtype">const <a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;&nbsp;</td>
764          <td class="paramname"> <em>X</em>, </td>
765        </tr>
766        <tr>
767          <td class="paramkey"></td>
768          <td></td>
769          <td class="paramtype">const <a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;&nbsp;</td>
770          <td class="paramname"> <em>Y</em></td><td>&nbsp;</td>
771        </tr>
772        <tr>
773          <td></td>
774          <td>)</td>
775          <td></td><td></td><td><code> [friend]</code></td>
776        </tr>
777      </table>
778</div>
779<div class="memdoc">
780
781<p>
782Addition operator.
783<p>
784GF(2) matrix addition.<p>
785Subtraction is not implemented because it is equivalent to addition.
786</div>
787</div><p>
788<a class="anchor" name="8fba9e54a6420b61f171d718cb6e1a76"></a><!-- doxytag: member="itpp::GF2mat::operator&lt;&lt;" ref="8fba9e54a6420b61f171d718cb6e1a76" args="(it_file &amp;f, const GF2mat &amp;X)" -->
789<div class="memitem">
790<div class="memproto">
791      <table class="memname">
792        <tr>
793          <td class="memname"><a class="el" href="classitpp_1_1it__file.html">it_file</a>&amp; operator&lt;&lt;           </td>
794          <td>(</td>
795          <td class="paramtype"><a class="el" href="classitpp_1_1it__file.html">it_file</a> &amp;&nbsp;</td>
796          <td class="paramname"> <em>f</em>, </td>
797        </tr>
798        <tr>
799          <td class="paramkey"></td>
800          <td></td>
801          <td class="paramtype">const <a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;&nbsp;</td>
802          <td class="paramname"> <em>X</em></td><td>&nbsp;</td>
803        </tr>
804        <tr>
805          <td></td>
806          <td>)</td>
807          <td></td><td></td><td><code> [friend]</code></td>
808        </tr>
809      </table>
810</div>
811<div class="memdoc">
812
813<p>
814Write the matrix to file.
815<p>
816/relatesalso <a class="el" href="classitpp_1_1GF2mat.html" title="Class for dense GF(2) matrices.">GF2mat</a> /brief Write GF(2) matrix to file.
817</div>
818</div><p>
819<a class="anchor" name="189b6e6faee514b7aecaed8894b978ee"></a><!-- doxytag: member="itpp::GF2mat::operator&lt;&lt;" ref="189b6e6faee514b7aecaed8894b978ee" args="(std::ostream &amp;os, const GF2mat &amp;X)" -->
820<div class="memitem">
821<div class="memproto">
822      <table class="memname">
823        <tr>
824          <td class="memname">std::ostream &amp; operator&lt;&lt;           </td>
825          <td>(</td>
826          <td class="paramtype">std::ostream &amp;&nbsp;</td>
827          <td class="paramname"> <em>os</em>, </td>
828        </tr>
829        <tr>
830          <td class="paramkey"></td>
831          <td></td>
832          <td class="paramtype">const <a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;&nbsp;</td>
833          <td class="paramname"> <em>X</em></td><td>&nbsp;</td>
834        </tr>
835        <tr>
836          <td></td>
837          <td>)</td>
838          <td></td><td></td><td><code> [friend]</code></td>
839        </tr>
840      </table>
841</div>
842<div class="memdoc">
843
844<p>
845Output stream operator (plain text).
846<p>
847Output stream (plain text) operator for dense GF(2) matrices.
848</div>
849</div><p>
850<a class="anchor" name="a46348071ba4d3116d473e188ef804a1"></a><!-- doxytag: member="itpp::GF2mat::operator&gt;&gt;" ref="a46348071ba4d3116d473e188ef804a1" args="(it_ifile &amp;f, GF2mat &amp;X)" -->
851<div class="memitem">
852<div class="memproto">
853      <table class="memname">
854        <tr>
855          <td class="memname"><a class="el" href="classitpp_1_1it__ifile.html">it_ifile</a>&amp; operator&gt;&gt;           </td>
856          <td>(</td>
857          <td class="paramtype"><a class="el" href="classitpp_1_1it__ifile.html">it_ifile</a> &amp;&nbsp;</td>
858          <td class="paramname"> <em>f</em>, </td>
859        </tr>
860        <tr>
861          <td class="paramkey"></td>
862          <td></td>
863          <td class="paramtype"><a class="el" href="classitpp_1_1GF2mat.html">GF2mat</a> &amp;&nbsp;</td>
864          <td class="paramname"> <em>X</em></td><td>&nbsp;</td>
865        </tr>
866        <tr>
867          <td></td>
868          <td>)</td>
869          <td></td><td></td><td><code> [friend]</code></td>
870        </tr>
871      </table>
872</div>
873<div class="memdoc">
874
875<p>
876Read the matrix from file.
877<p>
878/relatesalso <a class="el" href="classitpp_1_1GF2mat.html" title="Class for dense GF(2) matrices.">GF2mat</a> /brief Read GF(2) matrix from file.
879</div>
880</div><p>
881<hr>The documentation for this class was generated from the following files:<ul>
882<li><a class="el" href="gf2mat_8h-source.html">gf2mat.h</a><li><a class="el" href="gf2mat_8cpp.html">gf2mat.cpp</a></ul>
883</div>
884<hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:02:18 2009 for mixpp by&nbsp;
885<a href="http://www.doxygen.org/index.html">
886<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
887</body>
888</html>
Note: See TracBrowser for help on using the browser.