| [353] | 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: commfunc.h File 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 | <!-- | 
|---|
|  | 10 | function 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 | } | 
|---|
|  | 22 | function 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 | } | 
|---|
|  | 46 | window.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 Page</span></a></li> | 
|---|
|  | 53 | <li><a href="pages.html"><span>Related Pages</span></a></li> | 
|---|
|  | 54 | <li><a href="modules.html"><span>Modules</span></a></li> | 
|---|
|  | 55 | <li><a href="annotated.html"><span>Classes</span></a></li> | 
|---|
|  | 56 | <li class="current"><a href="files.html"><span>Files</span></a></li> | 
|---|
|  | 57 | </ul> | 
|---|
|  | 58 | </div> | 
|---|
|  | 59 | <div class="tabs"> | 
|---|
|  | 60 | <ul> | 
|---|
|  | 61 | <li><a href="files.html"><span>File List</span></a></li> | 
|---|
|  | 62 | <li><a href="globals.html"><span>File Members</span></a></li> | 
|---|
|  | 63 | </ul> | 
|---|
|  | 64 | </div> | 
|---|
|  | 65 | </div> | 
|---|
|  | 66 | <div class="contents"> | 
|---|
|  | 67 | <h1>commfunc.h File Reference</h1>Definitions of some specific functions useful in communications. | 
|---|
|  | 68 | <a href="#_details">More...</a> | 
|---|
|  | 69 | <p> | 
|---|
|  | 70 | <code>#include <<a class="el" href="mat_8h-source.html">itpp/base/mat.h</a>></code><br> | 
|---|
|  | 71 | <code>#include <<a class="el" href="vec_8h-source.html">itpp/base/vec.h</a>></code><br> | 
|---|
|  | 72 |  | 
|---|
|  | 73 | <p> | 
|---|
|  | 74 | <a href="commfunc_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0"> | 
|---|
|  | 75 | <tr><td></td></tr> | 
|---|
|  | 76 | <tr><td colspan="2"><br><h2>Functions</h2></td></tr> | 
|---|
|  | 77 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g568738607726089989baf278058899fd"></a><!-- doxytag: member="commfunc.h::graycode" ref="g568738607726089989baf278058899fd" args="(int m)" --> | 
|---|
|  | 78 | <a class="el" href="mat_8h.html#f90acd1af41bf2d1d8a4bb23662fff69">bmat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__misccommfunc.html#g568738607726089989baf278058899fd">itpp::graycode</a> (int m)</td></tr> | 
|---|
|  | 79 |  | 
|---|
|  | 80 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Generate Gray code of blocklength m.<p> | 
|---|
|  | 81 | The codes are contained as binary codewords {0,1} in the rows of the returned matrix. See also the <code>gray()</code> function in <code>math/scalfunc.h</code>. <br></td></tr> | 
|---|
|  | 82 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g3815994ee069b1911dec1fc6afc350c8"></a><!-- doxytag: member="commfunc.h::hamming_distance" ref="g3815994ee069b1911dec1fc6afc350c8" args="(const bvec &a, const bvec &b)" --> | 
|---|
|  | 83 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__misccommfunc.html#g3815994ee069b1911dec1fc6afc350c8">itpp::hamming_distance</a> (const <a class="el" href="classitpp_1_1Vec.html#e10151f44bbabf17b670a9493d8088cf">bvec</a> &a, const <a class="el" href="classitpp_1_1Vec.html#e10151f44bbabf17b670a9493d8088cf">bvec</a> &b)</td></tr> | 
|---|
|  | 84 |  | 
|---|
|  | 85 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculate the Hamming distance between <em>a</em> and <em>b</em>. <br></td></tr> | 
|---|
|  | 86 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g1661dfd39dc7327de562d3eca3d113aa"></a><!-- doxytag: member="commfunc.h::weight" ref="g1661dfd39dc7327de562d3eca3d113aa" args="(const bvec &a)" --> | 
|---|
|  | 87 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__misccommfunc.html#g1661dfd39dc7327de562d3eca3d113aa">itpp::weight</a> (const <a class="el" href="classitpp_1_1Vec.html#e10151f44bbabf17b670a9493d8088cf">bvec</a> &a)</td></tr> | 
|---|
|  | 88 |  | 
|---|
|  | 89 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculate the Hamming weight of <em>a</em>. <br></td></tr> | 
|---|
|  | 90 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classitpp_1_1Vec.html#02e1bb55f60f3c2eb7a020eb1c2cfcf4">vec</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__misccommfunc.html#gc2ed3971292517906bb3fa47e9bfb061">itpp::waterfilling</a> (const <a class="el" href="classitpp_1_1Vec.html#02e1bb55f60f3c2eb7a020eb1c2cfcf4">vec</a> &alpha, double P)</td></tr> | 
|---|
|  | 91 |  | 
|---|
|  | 92 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Compute the water-filling solution<p> | 
|---|
|  | 93 | This function computes the solution of the water-filling problem <p class="formulaDsp"> | 
|---|
|  | 94 | <img class="formulaDsp" alt="\[ \max_{p_0,...,p_{n-1}} \sum_{i=0}^{n-1} \log\left(1+p_i\alpha_i\right) \]" src="form_237.png"> | 
|---|
|  | 95 | <p> | 
|---|
|  | 96 | subject to <p class="formulaDsp"> | 
|---|
|  | 97 | <img class="formulaDsp" alt="\[ \sum_{i=0}^{n-1} p_i \le P \]" src="form_238.png"> | 
|---|
|  | 98 | <p> | 
|---|
|  | 99 | .  <a href="group__misccommfunc.html#gc2ed3971292517906bb3fa47e9bfb061"></a><br></td></tr> | 
|---|
|  | 100 | </table> | 
|---|
|  | 101 | <hr><a name="_details"></a><h2>Detailed Description</h2> | 
|---|
|  | 102 | Definitions of some specific functions useful in communications. | 
|---|
|  | 103 | <p> | 
|---|
|  | 104 | <dl class="author" compact><dt><b>Author:</b></dt><dd>Tony Ottosson and Erik G. Larsson</dd></dl> | 
|---|
|  | 105 | -------------------------------------------------------------------------<p> | 
|---|
|  | 106 | Copyright (C) 1995-2008 (see AUTHORS file for a list of contributors)<p> | 
|---|
|  | 107 | This file is part of IT++ - a C++ library of mathematical, signal processing, speech processing, and communications classes and functions.<p> | 
|---|
|  | 108 | IT++ is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.<p> | 
|---|
|  | 109 | IT++ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.<p> | 
|---|
|  | 110 | You should have received a copy of the GNU General Public License along with IT++. If not, see <<a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>>.<p> | 
|---|
|  | 111 | ------------------------------------------------------------------------- </div> | 
|---|
|  | 112 | <hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:02:13 2009 for mixpp by  | 
|---|
|  | 113 | <a href="http://www.doxygen.org/index.html"> | 
|---|
|  | 114 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> | 
|---|
|  | 115 | </body> | 
|---|
|  | 116 | </html> | 
|---|