This file is indexed.

/usr/share/doc/libitpp-dev/html/reedsolomon.html is in libitpp-doc 4.2-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
  <title>Welcome to IT++!</title>
  <link href="doxygen.css" rel="stylesheet" type="text/css">
  <link href="tabs.css" rel="stylesheet" type="text/css">
  <link rel="shortcut icon" href="favicon.ico">
</head>
<body>
<div style="width: 100%; height: 40px; background-color: #ffff00; border: 1px solid #b0b0b0; margin: 5px 5px 5px 0; padding: 2px;">
  <a href="http://itpp.sourceforge.net"><img src="itpp_logo.png" alt="IT++ Logo" style="float: left; border: 0;"></a>
</div>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">Simulation of a Reed-Solomon Block Code </div>  </div>
</div>
<div class="contents">
<div class="textblock"><p>A Reed-Solomon code is a <img class="formulaInl" alt="$q^m$" src="form_296.png"/>-ary BCH code of length <img class="formulaInl" alt="$q^m-1$" src="form_297.png"/>. The generator polynomial for a <img class="formulaInl" alt="$t$" src="form_188.png"/>-error correcting code is <img class="formulaInl" alt="$g(x) = (x-\alpha) (x-\alpha^1) \ldots (x-\alpha^{2t-1})$" src="form_298.png"/>. The decoder uses the Berlkamp-Massey algorithm for decoding as described in: S. B. Wicker, "Error Control Systems for digital communication and storage," Prentice Hall. The following example simulates a binary (i.e. <img class="formulaInl" alt="$q=2$" src="form_299.png"/>) Reed-Solomon code with parameters <img class="formulaInl" alt="$m$" src="form_300.png"/> and <img class="formulaInl" alt="$t$" src="form_188.png"/>:</p>
<div class="fragment"><pre class="fragment"><span class="preprocessor">#include &lt;<a class="code" href="itcomm_8h.html" title="Include file for the IT++ communications module.">itpp/itcomm.h</a>&gt;</span>

<span class="keyword">using namespace </span>itpp;

<span class="comment">//These lines are needed for use of cout and endl</span>
<span class="keyword">using</span> std::cout;
<span class="keyword">using</span> std::endl;

<span class="keywordtype">int</span> main()
{

  <span class="comment">//Scalars and vectors:</span>
  <span class="keywordtype">int</span> m, t, n, k, q, NumBits, NumCodeWords;
  <span class="keywordtype">double</span> p;
  bvec uncoded_bits, coded_bits, received_bits, decoded_bits;

  <span class="comment">//Set parameters:</span>
  NumCodeWords = 1000;  <span class="comment">//Number of Reed-Solomon code-words to simulate</span>
  p = 0.01;             <span class="comment">//BSC Error probability</span>
  m = 3;                <span class="comment">//Reed-Solomon parameter m</span>
  t = 2;                <span class="comment">//Reed-Solomon parameter t</span>

  cout &lt;&lt; <span class="stringliteral">&quot;Number of Reed-Solomon code-words to simulate: &quot;</span> &lt;&lt;  NumCodeWords &lt;&lt; endl;
  cout &lt;&lt; <span class="stringliteral">&quot;BSC Error probability : &quot;</span> &lt;&lt; p &lt;&lt; endl;
  cout &lt;&lt; <span class="stringliteral">&quot;RS m: &quot;</span> &lt;&lt; m &lt;&lt; endl;
  cout &lt;&lt; <span class="stringliteral">&quot;RS t: &quot;</span> &lt;&lt; t &lt;&lt; endl;

  <span class="comment">//Classes:</span>
  <a class="code" href="classitpp_1_1Reed__Solomon.html" title="Reed-Solomon Codes.">Reed_Solomon</a> reed_solomon(m, t);
  <a class="code" href="classitpp_1_1BSC.html" title="A Binary Symetric Channel with crossover probability p.">BSC</a> bsc(p);
  <a class="code" href="classitpp_1_1BERC.html" title="Bit Error Rate Counter (BERC) Class.">BERC</a> berc;

  <a class="code" href="group__randgen.html#gadf5dd6e879881b651896c213e6efd3ba" title="Set a random seed for the Global Random Number Generator.">RNG_randomize</a>();

  <span class="comment">//Calculate parameters for the Reed-Solomon Code:</span>
  n = <a class="code" href="group__convertfunc.html#ga82f2a2bcb10cbc8aa8c450ef5cc2c1a7" title="Round to nearest integer.">round_i</a>(<a class="code" href="group__logexpfunc.html#ga0c42d158b1f623f9b72c1ccde7e2fd09" title="Calculates x to the power of y (x^y)">pow</a>(2.0, m) - 1);
  k = <a class="code" href="group__convertfunc.html#ga82f2a2bcb10cbc8aa8c450ef5cc2c1a7" title="Round to nearest integer.">round_i</a>(<a class="code" href="group__logexpfunc.html#ga0c42d158b1f623f9b72c1ccde7e2fd09" title="Calculates x to the power of y (x^y)">pow</a>(2.0, m)) - 1 - 2 * t;
  q = <a class="code" href="group__convertfunc.html#ga82f2a2bcb10cbc8aa8c450ef5cc2c1a7" title="Round to nearest integer.">round_i</a>(<a class="code" href="group__logexpfunc.html#ga0c42d158b1f623f9b72c1ccde7e2fd09" title="Calculates x to the power of y (x^y)">pow</a>(2.0, m));

  cout &lt;&lt; <span class="stringliteral">&quot;Simulating an Reed-Solomon code with the following parameters:&quot;</span> &lt;&lt; endl;
  cout &lt;&lt; <span class="stringliteral">&quot;n = &quot;</span> &lt;&lt; n &lt;&lt; endl;
  cout &lt;&lt; <span class="stringliteral">&quot;k = &quot;</span> &lt;&lt; k &lt;&lt; endl;
  cout &lt;&lt; <span class="stringliteral">&quot;q = &quot;</span> &lt;&lt; q &lt;&lt; endl;

  NumBits = m * k * NumCodeWords;
  uncoded_bits = <a class="code" href="group__randgen.html#ga5aa06887cf1fd3301b040987924068f0" title="Generates a random bit (equally likely 0s and 1s)">randb</a>(NumBits);
  coded_bits = reed_solomon.encode(uncoded_bits);
  received_bits = bsc(coded_bits);
  decoded_bits = reed_solomon.decode(received_bits);

  berc.<a class="code" href="classitpp_1_1BERC.html#a539b0c989badff3027d97e4693fc9cd7" title="Cumulative error counter.">count</a>(uncoded_bits, decoded_bits);
  cout &lt;&lt; <span class="stringliteral">&quot;The bit error probability after decoding is &quot;</span> &lt;&lt; berc.<a class="code" href="classitpp_1_1BERC.html#af17d5f534ba34558d3632a98f29f0519" title="Returns the estimated bit error rate.">get_errorrate</a>() &lt;&lt; endl;

  <span class="comment">//Exit program:</span>
  <span class="keywordflow">return</span> 0;

}
</pre></div><p>A typical run of this program can look like this:</p>
<div class="fragment"><pre class="fragment">Number of Reed-Solomon code-words <a class="code" href="group__fixed.html#gab4732503214b5293aef0cbd2ab271c7c">to</a> simulate: 1000
BSC Error probability : 0.01
RS m: 3
RS t: 2
Simulating an Reed-Solomon code with the following parameters:
n = 7
k = 3
q = 8
The bit error probability after decoding is 0.000333333
</pre></div> </div></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div style="clear: both; width: 100%; height: 31px; background-color: #ffff00; border: 1px solid #b0b0b0; margin: 5px 5px 5px 0; padding: 2px;">
  <a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=37044&amp;type=1" alt="SourceForge Logo" style="float: right; border: 0;"></a>
  <p style="padding-left: 10px; font-size: 85%;">Generated on Wed Jul 27 2011 16:27:06 for IT++ by <a href="http://www.doxygen.org/index.html">Doxygen</a> 1.7.4</p>
</div>
</body>
</html>