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::Convolutional_Code Class Reference</title> |
---|
4 | <link href="tabs.css" rel="stylesheet" type="text/css"> |
---|
5 | <link href="doxygen.css" rel="stylesheet" type="text/css"> |
---|
6 | </head><body> |
---|
7 | <!-- Generated by Doxygen 1.5.8 --> |
---|
8 | <script type="text/javascript"> |
---|
9 | <!-- |
---|
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 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 List</span></a></li> |
---|
62 | <li><a href="classes.html"><span>Class Index</span></a></li> |
---|
63 | <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> |
---|
64 | <li><a href="functions.html"><span>Class Members</span></a></li> |
---|
65 | </ul> |
---|
66 | </div> |
---|
67 | <div class="navpath"><b>itpp</b>::<a class="el" href="classitpp_1_1Convolutional__Code.html">Convolutional_Code</a> |
---|
68 | </div> |
---|
69 | </div> |
---|
70 | <div class="contents"> |
---|
71 | <h1>itpp::Convolutional_Code Class Reference<br> |
---|
72 | <small> |
---|
73 | [<a class="el" href="group__fec.html">Forward Error Correcting Codes</a>]</small> |
---|
74 | </h1><!-- doxytag: class="itpp::Convolutional_Code" --><!-- doxytag: inherits="itpp::Channel_Code" -->Binary Convolutional rate 1/n class. |
---|
75 | <a href="#_details">More...</a> |
---|
76 | <p> |
---|
77 | <code>#include <<a class="el" href="convcode_8h-source.html">convcode.h</a>></code> |
---|
78 | <p> |
---|
79 | |
---|
80 | <p> |
---|
81 | <a href="classitpp_1_1Convolutional__Code-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> |
---|
82 | <tr><td></td></tr> |
---|
83 | <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> |
---|
84 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7fa593431fe01986a69247a493d88bae"></a><!-- doxytag: member="itpp::Convolutional_Code::Convolutional_Code" ref="7fa593431fe01986a69247a493d88bae" args="(void)" --> |
---|
85 | </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#7fa593431fe01986a69247a493d88bae">Convolutional_Code</a> (void)</td></tr> |
---|
86 | |
---|
87 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor - sets (0133,0171) code with tail. <br></td></tr> |
---|
88 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7e2a367b256e504f8c229afa677d8d23"></a><!-- doxytag: member="itpp::Convolutional_Code::~Convolutional_Code" ref="7e2a367b256e504f8c229afa677d8d23" args="(void)" --> |
---|
89 | virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#7e2a367b256e504f8c229afa677d8d23">~Convolutional_Code</a> (void)</td></tr> |
---|
90 | |
---|
91 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <br></td></tr> |
---|
92 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1c49283f24dddf4e8cee2835f9d26afe"></a><!-- doxytag: member="itpp::Convolutional_Code::set_method" ref="1c49283f24dddf4e8cee2835f9d26afe" args="(const CONVOLUTIONAL_CODE_METHOD method)" --> |
---|
93 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#1c49283f24dddf4e8cee2835f9d26afe">set_method</a> (const <a class="el" href="group__fec.html#ge22fe2744a6f00b512ee75e304d72a82">CONVOLUTIONAL_CODE_METHOD</a> method)</td></tr> |
---|
94 | |
---|
95 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set encoding and decoding method (Trunc, Tail, or Tailbite). <br></td></tr> |
---|
96 | <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#9860c6e22e6f7a58c020534045a432d0">set_code</a> (const <a class="el" href="group__fec.html#ge9651aa649deec69310af24cd89b8729">CONVOLUTIONAL_CODE_TYPE</a> type_of_code, int inverse_rate, int constraint_length)</td></tr> |
---|
97 | |
---|
98 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the code according to built-in tables. <a href="#9860c6e22e6f7a58c020534045a432d0"></a><br></td></tr> |
---|
99 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b8ca18ab14b3b6a1e1a1132f0386c84f"></a><!-- doxytag: member="itpp::Convolutional_Code::set_generator_polynomials" ref="b8ca18ab14b3b6a1e1a1132f0386c84f" args="(const ivec &gen, int constraint_length)" --> |
---|
100 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#b8ca18ab14b3b6a1e1a1132f0386c84f">set_generator_polynomials</a> (const ivec &gen, int constraint_length)</td></tr> |
---|
101 | |
---|
102 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set generator polynomials. Given in Proakis integer form. <br></td></tr> |
---|
103 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="342e071696583197507b85fb45146bc6"></a><!-- doxytag: member="itpp::Convolutional_Code::get_generator_polynomials" ref="342e071696583197507b85fb45146bc6" args="(void) const " --> |
---|
104 | ivec </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#342e071696583197507b85fb45146bc6">get_generator_polynomials</a> (void) const </td></tr> |
---|
105 | |
---|
106 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Get generator polynomials. <br></td></tr> |
---|
107 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6ac83f0a1be7b4f6f06a1b4d7b45489a"></a><!-- doxytag: member="itpp::Convolutional_Code::reset" ref="6ac83f0a1be7b4f6f06a1b4d7b45489a" args="()" --> |
---|
108 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#6ac83f0a1be7b4f6f06a1b4d7b45489a">reset</a> ()</td></tr> |
---|
109 | |
---|
110 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Reset encoder and decoder states. <br></td></tr> |
---|
111 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f3bf2206a471342563a4080e42d6b435"></a><!-- doxytag: member="itpp::Convolutional_Code::decode" ref="f3bf2206a471342563a4080e42d6b435" args="(const bvec &coded_bits, bvec &decoded_bits)" --> |
---|
112 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#f3bf2206a471342563a4080e42d6b435">decode</a> (const bvec &coded_bits, bvec &decoded_bits)</td></tr> |
---|
113 | |
---|
114 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Decode a bvec of coded data. <br></td></tr> |
---|
115 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="59ade7649db617d9ad30401342075cb7"></a><!-- doxytag: member="itpp::Convolutional_Code::decode" ref="59ade7649db617d9ad30401342075cb7" args="(const bvec &coded_bits)" --> |
---|
116 | virtual bvec </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#59ade7649db617d9ad30401342075cb7">decode</a> (const bvec &coded_bits)</td></tr> |
---|
117 | |
---|
118 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Decode a bvec of coded data. <br></td></tr> |
---|
119 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e7e892230d677d7b64917cd6f8e7b823"></a><!-- doxytag: member="itpp::Convolutional_Code::get_rate" ref="e7e892230d677d7b64917cd6f8e7b823" args="(void) const " --> |
---|
120 | virtual double </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#e7e892230d677d7b64917cd6f8e7b823">get_rate</a> (void) const </td></tr> |
---|
121 | |
---|
122 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Return rate of code (not including the rate-loss). <br></td></tr> |
---|
123 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6316d7d75c01471aa44d533fdaa586c1"></a><!-- doxytag: member="itpp::Convolutional_Code::set_start_state" ref="6316d7d75c01471aa44d533fdaa586c1" args="(int state)" --> |
---|
124 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#6316d7d75c01471aa44d533fdaa586c1">set_start_state</a> (int state)</td></tr> |
---|
125 | |
---|
126 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set encoder default start state. <br></td></tr> |
---|
127 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9ef6fc1934531d3c12123ed90c5b4c40"></a><!-- doxytag: member="itpp::Convolutional_Code::init_encoder" ref="9ef6fc1934531d3c12123ed90c5b4c40" args="()" --> |
---|
128 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#9ef6fc1934531d3c12123ed90c5b4c40">init_encoder</a> ()</td></tr> |
---|
129 | |
---|
130 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Initialise internal encoder state with start state. Has no effect on <code>Tail</code> and <code>Tailbite</code> methods. <br></td></tr> |
---|
131 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="22321baddd7afddcd255356debaf0fb8"></a><!-- doxytag: member="itpp::Convolutional_Code::get_encoder_state" ref="22321baddd7afddcd255356debaf0fb8" args="(void) const " --> |
---|
132 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#22321baddd7afddcd255356debaf0fb8">get_encoder_state</a> (void) const </td></tr> |
---|
133 | |
---|
134 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the current encoder state. <br></td></tr> |
---|
135 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a1929841dfb95d406fa1a16867f144bb"></a><!-- doxytag: member="itpp::Convolutional_Code::set_truncation_length" ref="a1929841dfb95d406fa1a16867f144bb" args="(const int length)" --> |
---|
136 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#a1929841dfb95d406fa1a16867f144bb">set_truncation_length</a> (const int length)</td></tr> |
---|
137 | |
---|
138 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set memory truncation length. Must be at least K. <br></td></tr> |
---|
139 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="35d7ef525f88707e4ff2c6ed05469c00"></a><!-- doxytag: member="itpp::Convolutional_Code::get_truncation_length" ref="35d7ef525f88707e4ff2c6ed05469c00" args="(void) const " --> |
---|
140 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#35d7ef525f88707e4ff2c6ed05469c00">get_truncation_length</a> (void) const </td></tr> |
---|
141 | |
---|
142 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Get memory truncation length. <br></td></tr> |
---|
143 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7fbeb36821dcd85d981ae99bc106cba8"></a><!-- doxytag: member="itpp::Convolutional_Code::catastrophic" ref="7fbeb36821dcd85d981ae99bc106cba8" args="(void)" --> |
---|
144 | bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#7fbeb36821dcd85d981ae99bc106cba8">catastrophic</a> (void)</td></tr> |
---|
145 | |
---|
146 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Check if catastrophic. Returns true if catastrophic. <br></td></tr> |
---|
147 | <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#635406cac085c188709234c688ce2c68">inverse_tail</a> (const bvec coded_sequence, bvec &input)</td></tr> |
---|
148 | |
---|
149 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculate the inverse sequence. <a href="#635406cac085c188709234c688ce2c68"></a><br></td></tr> |
---|
150 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e99bf2f2d1973c7626214ad93222cbcf"></a><!-- doxytag: member="itpp::Convolutional_Code::distance_profile" ref="e99bf2f2d1973c7626214ad93222cbcf" args="(ivec &dist_prof, int dmax=100000, bool reverse=false)" --> |
---|
151 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#e99bf2f2d1973c7626214ad93222cbcf">distance_profile</a> (ivec &dist_prof, int dmax=100000, bool reverse=false)</td></tr> |
---|
152 | |
---|
153 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculate distance profile. If reverse = true calculate for the reverse code instead. <br></td></tr> |
---|
154 | <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#3f442fd4218c746dc046ea996f301cf7">calculate_spectrum</a> (<a class="el" href="classitpp_1_1Array.html">Array</a>< ivec > &spectrum, int dmax, int no_terms)</td></tr> |
---|
155 | |
---|
156 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculate spectrum. <a href="#3f442fd4218c746dc046ea996f301cf7"></a><br></td></tr> |
---|
157 | <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#8217a8922992b1fb4faa28d86f21e6d7">fast</a> (<a class="el" href="classitpp_1_1Array.html">Array</a>< ivec > &spectrum, const int dfree, const int no_terms, const int Cdfree=1000000, const bool test_catastrophic=false)</td></tr> |
---|
158 | |
---|
159 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Cederwall's fast algorithm. <a href="#8217a8922992b1fb4faa28d86f21e6d7"></a><br></td></tr> |
---|
160 | <tr><td colspan="2"><div class="groupHeader"></div></td></tr> |
---|
161 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f9d5354b5ea7f2a090a488b383e995ef"></a><!-- doxytag: member="itpp::Convolutional_Code::encode" ref="f9d5354b5ea7f2a090a488b383e995ef" args="(const bvec &input, bvec &output)" --> |
---|
162 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#f9d5354b5ea7f2a090a488b383e995ef">encode</a> (const bvec &input, bvec &output)</td></tr> |
---|
163 | |
---|
164 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Encode an input binary vector using specified method (Tail by default). <br></td></tr> |
---|
165 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fbed8d23cbffca2d0802234592b034b4"></a><!-- doxytag: member="itpp::Convolutional_Code::encode" ref="fbed8d23cbffca2d0802234592b034b4" args="(const bvec &input)" --> |
---|
166 | virtual bvec </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#fbed8d23cbffca2d0802234592b034b4">encode</a> (const bvec &input)</td></tr> |
---|
167 | |
---|
168 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Encode a bvec of input. <br></td></tr> |
---|
169 | <tr><td colspan="2"><div class="groupHeader"></div></td></tr> |
---|
170 | <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#b2acc3b632782ff035fa1b5b2b122153">encode_trunc</a> (const bvec &input, bvec &output)</td></tr> |
---|
171 | |
---|
172 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Encode a binary vector starting from the previous encoder state. <a href="#b2acc3b632782ff035fa1b5b2b122153"></a><br></td></tr> |
---|
173 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8e17b5077deeb8fea1bc2a617a7d92e6"></a><!-- doxytag: member="itpp::Convolutional_Code::encode_trunc" ref="8e17b5077deeb8fea1bc2a617a7d92e6" args="(const bvec &input)" --> |
---|
174 | bvec </td><td class="memItemRight" valign="bottom"><b>encode_trunc</b> (const bvec &input)</td></tr> |
---|
175 | |
---|
176 | <tr><td colspan="2"><div class="groupHeader"></div></td></tr> |
---|
177 | <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#47230acfea5aa32cb31e63abca1d222e">encode_tail</a> (const bvec &input, bvec &output)</td></tr> |
---|
178 | |
---|
179 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Encoding that starts and ends in the zero state. <a href="#47230acfea5aa32cb31e63abca1d222e"></a><br></td></tr> |
---|
180 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b6e95d4835d7e783ed6f46f2f2ca710d"></a><!-- doxytag: member="itpp::Convolutional_Code::encode_tail" ref="b6e95d4835d7e783ed6f46f2f2ca710d" args="(const bvec &input)" --> |
---|
181 | bvec </td><td class="memItemRight" valign="bottom"><b>encode_tail</b> (const bvec &input)</td></tr> |
---|
182 | |
---|
183 | <tr><td colspan="2"><div class="groupHeader"></div></td></tr> |
---|
184 | <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#34e2691d01bc0b35d81f109f27bedfa2">encode_tailbite</a> (const bvec &input, bvec &output)</td></tr> |
---|
185 | |
---|
186 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Encode an input binary vector using tailbiting. <a href="#34e2691d01bc0b35d81f109f27bedfa2"></a><br></td></tr> |
---|
187 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0a37137eb369e9cd6208fa77f2462e98"></a><!-- doxytag: member="itpp::Convolutional_Code::encode_tailbite" ref="0a37137eb369e9cd6208fa77f2462e98" args="(const bvec &input)" --> |
---|
188 | bvec </td><td class="memItemRight" valign="bottom"><b>encode_tailbite</b> (const bvec &input)</td></tr> |
---|
189 | |
---|
190 | <tr><td colspan="2"><div class="groupHeader"></div></td></tr> |
---|
191 | <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#a6884e3f60678177fbf60e22d2447a5b">encode_bit</a> (const <a class="el" href="classitpp_1_1bin.html">bin</a> &input, bvec &output)</td></tr> |
---|
192 | |
---|
193 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Encode a binary bit starting from the internal encoder state. <a href="#a6884e3f60678177fbf60e22d2447a5b"></a><br></td></tr> |
---|
194 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0c0c16ff8863936435a73f3e1efd9b99"></a><!-- doxytag: member="itpp::Convolutional_Code::encode_bit" ref="0c0c16ff8863936435a73f3e1efd9b99" args="(const bin &input)" --> |
---|
195 | bvec </td><td class="memItemRight" valign="bottom"><b>encode_bit</b> (const <a class="el" href="classitpp_1_1bin.html">bin</a> &input)</td></tr> |
---|
196 | |
---|
197 | <tr><td colspan="2"><div class="groupHeader"></div></td></tr> |
---|
198 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cb932da00b3bb0e218175f180a770131"></a><!-- doxytag: member="itpp::Convolutional_Code::decode" ref="cb932da00b3bb0e218175f180a770131" args="(const vec &received_signal, bvec &output)" --> |
---|
199 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#cb932da00b3bb0e218175f180a770131">decode</a> (const vec &received_signal, bvec &output)</td></tr> |
---|
200 | |
---|
201 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Decode a block of encoded data using specified method (Tail by default). <br></td></tr> |
---|
202 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fbeada8e8cbeccdababfb26658faa02a"></a><!-- doxytag: member="itpp::Convolutional_Code::decode" ref="fbeada8e8cbeccdababfb26658faa02a" args="(const vec &received_signal)" --> |
---|
203 | virtual bvec </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#fbeada8e8cbeccdababfb26658faa02a">decode</a> (const vec &received_signal)</td></tr> |
---|
204 | |
---|
205 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Decode a vec of received data. <br></td></tr> |
---|
206 | <tr><td colspan="2"><div class="groupHeader"></div></td></tr> |
---|
207 | <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#9f42d8c8bdb51460ebc7d43deb93bad7">decode_tail</a> (const vec &received_signal, bvec &output)</td></tr> |
---|
208 | |
---|
209 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Decode a block of encoded data where encode_tail has been used. <a href="#9f42d8c8bdb51460ebc7d43deb93bad7"></a><br></td></tr> |
---|
210 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6d4f0958fb739bbb86d2d969d8329ffb"></a><!-- doxytag: member="itpp::Convolutional_Code::decode_tail" ref="6d4f0958fb739bbb86d2d969d8329ffb" args="(const vec &received_signal)" --> |
---|
211 | virtual bvec </td><td class="memItemRight" valign="bottom"><b>decode_tail</b> (const vec &received_signal)</td></tr> |
---|
212 | |
---|
213 | <tr><td colspan="2"><div class="groupHeader"></div></td></tr> |
---|
214 | <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#94f2b7f77dc08fc0fb975735762be742">decode_tailbite</a> (const vec &received_signal, bvec &output)</td></tr> |
---|
215 | |
---|
216 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Decode a block of encoded data where encode_tailbite has been used. <a href="#94f2b7f77dc08fc0fb975735762be742"></a><br></td></tr> |
---|
217 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="22a8f34f47de47a3dfa033efca3a6fd0"></a><!-- doxytag: member="itpp::Convolutional_Code::decode_tailbite" ref="22a8f34f47de47a3dfa033efca3a6fd0" args="(const vec &received_signal)" --> |
---|
218 | virtual bvec </td><td class="memItemRight" valign="bottom"><b>decode_tailbite</b> (const vec &received_signal)</td></tr> |
---|
219 | |
---|
220 | <tr><td colspan="2"><div class="groupHeader"></div></td></tr> |
---|
221 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d92e8a3b194cc00bf29e060fb90b666a"></a><!-- doxytag: member="itpp::Convolutional_Code::decode_trunc" ref="d92e8a3b194cc00bf29e060fb90b666a" args="(const vec &received_signal, bvec &output)" --> |
---|
222 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#d92e8a3b194cc00bf29e060fb90b666a">decode_trunc</a> (const vec &received_signal, bvec &output)</td></tr> |
---|
223 | |
---|
224 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Viterbi decoding using truncation of memory (default = 5*K). <br></td></tr> |
---|
225 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d7e393ed6dccc03984b626ca6c3466df"></a><!-- doxytag: member="itpp::Convolutional_Code::decode_trunc" ref="d7e393ed6dccc03984b626ca6c3466df" args="(const vec &received_signal)" --> |
---|
226 | virtual bvec </td><td class="memItemRight" valign="bottom"><b>decode_trunc</b> (const vec &received_signal)</td></tr> |
---|
227 | |
---|
228 | <tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr> |
---|
229 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="31df4741737f7b87b848ce95505f80fc"></a><!-- doxytag: member="itpp::Convolutional_Code::next_state" ref="31df4741737f7b87b848ce95505f80fc" args="(const int instate, const int input)" --> |
---|
230 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#31df4741737f7b87b848ce95505f80fc">next_state</a> (const int instate, const int input)</td></tr> |
---|
231 | |
---|
232 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Next state from instate given the input. <br></td></tr> |
---|
233 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7bdfde49b386946dcd7476fbd2488dd8"></a><!-- doxytag: member="itpp::Convolutional_Code::previous_state" ref="7bdfde49b386946dcd7476fbd2488dd8" args="(const int state, const int input)" --> |
---|
234 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#7bdfde49b386946dcd7476fbd2488dd8">previous_state</a> (const int state, const int input)</td></tr> |
---|
235 | |
---|
236 | <tr><td class="mdescLeft"> </td><td class="mdescRight">The previous state from state given the input. <br></td></tr> |
---|
237 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="681ad623bd14abcaabfa317d6fd0bdad"></a><!-- doxytag: member="itpp::Convolutional_Code::previous_state" ref="681ad623bd14abcaabfa317d6fd0bdad" args="(const int state, int &S0, int &S1)" --> |
---|
238 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#681ad623bd14abcaabfa317d6fd0bdad">previous_state</a> (const int state, int &S0, int &S1)</td></tr> |
---|
239 | |
---|
240 | <tr><td class="mdescLeft"> </td><td class="mdescRight">The previous state from state given the input. <br></td></tr> |
---|
241 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ceb3aadcb9da39f2330d5e9870bda5af"></a><!-- doxytag: member="itpp::Convolutional_Code::weight" ref="ceb3aadcb9da39f2330d5e9870bda5af" args="(const int state, const int input)" --> |
---|
242 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#ceb3aadcb9da39f2330d5e9870bda5af">weight</a> (const int state, const int input)</td></tr> |
---|
243 | |
---|
244 | <tr><td class="mdescLeft"> </td><td class="mdescRight">The weight of the transition from given state with the input given. <br></td></tr> |
---|
245 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7518410d14d05925f4e8a6de2655399a"></a><!-- doxytag: member="itpp::Convolutional_Code::weight" ref="7518410d14d05925f4e8a6de2655399a" args="(const int state, int &w0, int &w1)" --> |
---|
246 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#7518410d14d05925f4e8a6de2655399a">weight</a> (const int state, int &w0, int &w1)</td></tr> |
---|
247 | |
---|
248 | <tr><td class="mdescLeft"> </td><td class="mdescRight">The weight of the two paths (input 0 or 1) from given state. <br></td></tr> |
---|
249 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f600390d130ce3cb7aa2e33037560626"></a><!-- doxytag: member="itpp::Convolutional_Code::weight_reverse" ref="f600390d130ce3cb7aa2e33037560626" args="(const int state, const int input)" --> |
---|
250 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#f600390d130ce3cb7aa2e33037560626">weight_reverse</a> (const int state, const int input)</td></tr> |
---|
251 | |
---|
252 | <tr><td class="mdescLeft"> </td><td class="mdescRight">The weight (of the reverse code) of the transition from given state with the input given. <br></td></tr> |
---|
253 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2814b056af9cb40570aeaa39fc3f322f"></a><!-- doxytag: member="itpp::Convolutional_Code::weight_reverse" ref="2814b056af9cb40570aeaa39fc3f322f" args="(const int state, int &w0, int &w1)" --> |
---|
254 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#2814b056af9cb40570aeaa39fc3f322f">weight_reverse</a> (const int state, int &w0, int &w1)</td></tr> |
---|
255 | |
---|
256 | <tr><td class="mdescLeft"> </td><td class="mdescRight">The weight (of the reverse code) of the two paths (input 0 or 1) from given state. <br></td></tr> |
---|
257 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f286a1fb3897e5fd78e749b03aaadff6"></a><!-- doxytag: member="itpp::Convolutional_Code::output_reverse" ref="f286a1fb3897e5fd78e749b03aaadff6" args="(const int state, const int input)" --> |
---|
258 | bvec </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#f286a1fb3897e5fd78e749b03aaadff6">output_reverse</a> (const int state, const int input)</td></tr> |
---|
259 | |
---|
260 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Output on transition (backwards) with input from state. <br></td></tr> |
---|
261 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1780746970f5e9ffdddd26bc805e087d"></a><!-- doxytag: member="itpp::Convolutional_Code::output_reverse" ref="1780746970f5e9ffdddd26bc805e087d" args="(const int state, bvec &zero_output, bvec &one_output)" --> |
---|
262 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#1780746970f5e9ffdddd26bc805e087d">output_reverse</a> (const int state, bvec &zero_output, bvec &one_output)</td></tr> |
---|
263 | |
---|
264 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Output on transition (backwards) with input from state. <br></td></tr> |
---|
265 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="45d579da2009db6c0e7074c826ff96c2"></a><!-- doxytag: member="itpp::Convolutional_Code::output_reverse" ref="45d579da2009db6c0e7074c826ff96c2" args="(const int state, int &zero_output, int &one_output)" --> |
---|
266 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#45d579da2009db6c0e7074c826ff96c2">output_reverse</a> (const int state, int &zero_output, int &one_output)</td></tr> |
---|
267 | |
---|
268 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Output on transition (backwards) with input from state. <br></td></tr> |
---|
269 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5860dd3376bf2b0971e8e2a45b755b04"></a><!-- doxytag: member="itpp::Convolutional_Code::calc_metric_reverse" ref="5860dd3376bf2b0971e8e2a45b755b04" args="(const int state, const vec &rx_codeword, double &zero_metric, double &one_metric)" --> |
---|
270 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#5860dd3376bf2b0971e8e2a45b755b04">calc_metric_reverse</a> (const int state, const vec &rx_codeword, double &zero_metric, double &one_metric)</td></tr> |
---|
271 | |
---|
272 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculate delta metrics for 0 and 1 input branches reaching state. <br></td></tr> |
---|
273 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="79f47928875683c5b2d91c50220ff3d6"></a><!-- doxytag: member="itpp::Convolutional_Code::calc_metric" ref="79f47928875683c5b2d91c50220ff3d6" args="(const vec &rx_codeword, vec &delta_metrics)" --> |
---|
274 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#79f47928875683c5b2d91c50220ff3d6">calc_metric</a> (const vec &rx_codeword, vec &delta_metrics)</td></tr> |
---|
275 | |
---|
276 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculate delta metrics for all possible codewords. <br></td></tr> |
---|
277 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="028a1867c118c4fc5f8fea9b404bf20d"></a><!-- doxytag: member="itpp::Convolutional_Code::get_input" ref="028a1867c118c4fc5f8fea9b404bf20d" args="(const int state)" --> |
---|
278 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#028a1867c118c4fc5f8fea9b404bf20d">get_input</a> (const int state)</td></tr> |
---|
279 | |
---|
280 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the input that results in state, that is the MSB of state. <br></td></tr> |
---|
281 | <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> |
---|
282 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b314ab153e137a68c8a0ca6e1bbbdbee"></a><!-- doxytag: member="itpp::Convolutional_Code::n" ref="b314ab153e137a68c8a0ca6e1bbbdbee" args="" --> |
---|
283 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#b314ab153e137a68c8a0ca6e1bbbdbee">n</a></td></tr> |
---|
284 | |
---|
285 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Number of generators. <br></td></tr> |
---|
286 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="63430f36f9dc2c9d78b9a0ce145a8f2d"></a><!-- doxytag: member="itpp::Convolutional_Code::K" ref="63430f36f9dc2c9d78b9a0ce145a8f2d" args="" --> |
---|
287 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#63430f36f9dc2c9d78b9a0ce145a8f2d">K</a></td></tr> |
---|
288 | |
---|
289 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Constraint length. <br></td></tr> |
---|
290 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b93371ece607184c04780de0e05d7abc"></a><!-- doxytag: member="itpp::Convolutional_Code::m" ref="b93371ece607184c04780de0e05d7abc" args="" --> |
---|
291 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#b93371ece607184c04780de0e05d7abc">m</a></td></tr> |
---|
292 | |
---|
293 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Memory of the encoder. <br></td></tr> |
---|
294 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8c164aac0932007e5eeaa502d5bdb1ca"></a><!-- doxytag: member="itpp::Convolutional_Code::no_states" ref="8c164aac0932007e5eeaa502d5bdb1ca" args="" --> |
---|
295 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#8c164aac0932007e5eeaa502d5bdb1ca">no_states</a></td></tr> |
---|
296 | |
---|
297 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Number of states. <br></td></tr> |
---|
298 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e5b54f1bab039f8480c7ae0013f3f5fe"></a><!-- doxytag: member="itpp::Convolutional_Code::gen_pol" ref="e5b54f1bab039f8480c7ae0013f3f5fe" args="" --> |
---|
299 | ivec </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#e5b54f1bab039f8480c7ae0013f3f5fe">gen_pol</a></td></tr> |
---|
300 | |
---|
301 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Generator polynomials. <br></td></tr> |
---|
302 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d072282520c19e64e8a88e0e79d91b96"></a><!-- doxytag: member="itpp::Convolutional_Code::gen_pol_rev" ref="d072282520c19e64e8a88e0e79d91b96" args="" --> |
---|
303 | ivec </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#d072282520c19e64e8a88e0e79d91b96">gen_pol_rev</a></td></tr> |
---|
304 | |
---|
305 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Generator polynomials for the reverse code. <br></td></tr> |
---|
306 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="04a91848197a2624c5dbdbcd5224166a"></a><!-- doxytag: member="itpp::Convolutional_Code::encoder_state" ref="04a91848197a2624c5dbdbcd5224166a" args="" --> |
---|
307 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#04a91848197a2624c5dbdbcd5224166a">encoder_state</a></td></tr> |
---|
308 | |
---|
309 | <tr><td class="mdescLeft"> </td><td class="mdescRight">The current encoder state. <br></td></tr> |
---|
310 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7bfc69c7f70316fe051e2802c9f09ee3"></a><!-- doxytag: member="itpp::Convolutional_Code::start_state" ref="7bfc69c7f70316fe051e2802c9f09ee3" args="" --> |
---|
311 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#7bfc69c7f70316fe051e2802c9f09ee3">start_state</a></td></tr> |
---|
312 | |
---|
313 | <tr><td class="mdescLeft"> </td><td class="mdescRight">The encoder start state. <br></td></tr> |
---|
314 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="57ef97ff464b7f36a284540426a26ce3"></a><!-- doxytag: member="itpp::Convolutional_Code::trunc_length" ref="57ef97ff464b7f36a284540426a26ce3" args="" --> |
---|
315 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#57ef97ff464b7f36a284540426a26ce3">trunc_length</a></td></tr> |
---|
316 | |
---|
317 | <tr><td class="mdescLeft"> </td><td class="mdescRight">The decoder truncation length. <br></td></tr> |
---|
318 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0e92407956851a04cffa5f89f2fd39a5"></a><!-- doxytag: member="itpp::Convolutional_Code::rate" ref="0e92407956851a04cffa5f89f2fd39a5" args="" --> |
---|
319 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#0e92407956851a04cffa5f89f2fd39a5">rate</a></td></tr> |
---|
320 | |
---|
321 | <tr><td class="mdescLeft"> </td><td class="mdescRight">The rate of the code. <br></td></tr> |
---|
322 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e31e1e09af8f51be5eb37ffca507d232"></a><!-- doxytag: member="itpp::Convolutional_Code::xor_int_table" ref="e31e1e09af8f51be5eb37ffca507d232" args="" --> |
---|
323 | bvec </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#e31e1e09af8f51be5eb37ffca507d232">xor_int_table</a></td></tr> |
---|
324 | |
---|
325 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Auxilary table used by the codec. <br></td></tr> |
---|
326 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7e63597801ab594d590234192eed3da4"></a><!-- doxytag: member="itpp::Convolutional_Code::output_reverse_int" ref="7e63597801ab594d590234192eed3da4" args="" --> |
---|
327 | imat </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#7e63597801ab594d590234192eed3da4">output_reverse_int</a></td></tr> |
---|
328 | |
---|
329 | <tr><td class="mdescLeft"> </td><td class="mdescRight">output in int format for a given state and input <br></td></tr> |
---|
330 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="df24ee075bc58e4b277c44cfd146d84b"></a><!-- doxytag: member="itpp::Convolutional_Code::cc_method" ref="df24ee075bc58e4b277c44cfd146d84b" args="" --> |
---|
331 | <a class="el" href="group__fec.html#ge22fe2744a6f00b512ee75e304d72a82">CONVOLUTIONAL_CODE_METHOD</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#df24ee075bc58e4b277c44cfd146d84b">cc_method</a></td></tr> |
---|
332 | |
---|
333 | <tr><td class="mdescLeft"> </td><td class="mdescRight">encoding and decoding method <br></td></tr> |
---|
334 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2be7d32bc57f8be15b9e45993d88253b"></a><!-- doxytag: member="itpp::Convolutional_Code::path_memory" ref="2be7d32bc57f8be15b9e45993d88253b" args="" --> |
---|
335 | imat </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#2be7d32bc57f8be15b9e45993d88253b">path_memory</a></td></tr> |
---|
336 | |
---|
337 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Path memory (trellis). <br></td></tr> |
---|
338 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e840a45790781563ef45047652bf794b"></a><!-- doxytag: member="itpp::Convolutional_Code::visited_state" ref="e840a45790781563ef45047652bf794b" args="" --> |
---|
339 | <a class="el" href="classitpp_1_1Array.html">Array</a>< bool > </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#e840a45790781563ef45047652bf794b">visited_state</a></td></tr> |
---|
340 | |
---|
341 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Visited states. <br></td></tr> |
---|
342 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2a894772cc027542c600f5b86fe17173"></a><!-- doxytag: member="itpp::Convolutional_Code::sum_metric" ref="2a894772cc027542c600f5b86fe17173" args="" --> |
---|
343 | vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#2a894772cc027542c600f5b86fe17173">sum_metric</a></td></tr> |
---|
344 | |
---|
345 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Metrics accumulator. <br></td></tr> |
---|
346 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="89b0d6ba21457e1aab73f53631a5cb7f"></a><!-- doxytag: member="itpp::Convolutional_Code::trunc_ptr" ref="89b0d6ba21457e1aab73f53631a5cb7f" args="" --> |
---|
347 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#89b0d6ba21457e1aab73f53631a5cb7f">trunc_ptr</a></td></tr> |
---|
348 | |
---|
349 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Truncated path memory pointer. <br></td></tr> |
---|
350 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d26ed837b36f7313277a2b1dcc7b0c4c"></a><!-- doxytag: member="itpp::Convolutional_Code::trunc_state" ref="d26ed837b36f7313277a2b1dcc7b0c4c" args="" --> |
---|
351 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#d26ed837b36f7313277a2b1dcc7b0c4c">trunc_state</a></td></tr> |
---|
352 | |
---|
353 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Truncated memory fill state. <br></td></tr> |
---|
354 | <tr><td colspan="2"><br><h2>Related Functions</h2></td></tr> |
---|
355 | <tr><td colspan="2">(Note that these are not member functions.) <br><br></td></tr> |
---|
356 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ca1881cee55d7c3219f46dd40e7cbd31"></a><!-- doxytag: member="itpp::Convolutional_Code::reverse_int" ref="ca1881cee55d7c3219f46dd40e7cbd31" args="(int length, int in)" --> |
---|
357 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#ca1881cee55d7c3219f46dd40e7cbd31">reverse_int</a> (int length, int in)</td></tr> |
---|
358 | |
---|
359 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Reverses the bitrepresentation of in (of size length) and converts to an integer. <br></td></tr> |
---|
360 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="33760fc0bdf27b4b5232694796590365"></a><!-- doxytag: member="itpp::Convolutional_Code::weight_int" ref="33760fc0bdf27b4b5232694796590365" args="(int length, int in)" --> |
---|
361 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#33760fc0bdf27b4b5232694796590365">weight_int</a> (int length, int in)</td></tr> |
---|
362 | |
---|
363 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculate the Hamming weight of the binary representation of in of size length. <br></td></tr> |
---|
364 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9e332af5e8d1ce1ba795f4e032adace2"></a><!-- doxytag: member="itpp::Convolutional_Code::compare_spectra" ref="9e332af5e8d1ce1ba795f4e032adace2" args="(ivec v1, ivec v2)" --> |
---|
365 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#9e332af5e8d1ce1ba795f4e032adace2">compare_spectra</a> (ivec v1, ivec v2)</td></tr> |
---|
366 | |
---|
367 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Compare two distance spectra. Return 1 if v1 is less, 0 if v2 less, and -1 if equal. <br></td></tr> |
---|
368 | <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Convolutional__Code.html#4abebe627013b4dfb5e1025c1f94c769">compare_spectra</a> (ivec v1, ivec v2, vec weight_profile)</td></tr> |
---|
369 | |
---|
370 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Compare two distance spectra using a weight profile. <a href="#4abebe627013b4dfb5e1025c1f94c769"></a><br></td></tr> |
---|
371 | </table> |
---|
372 | <hr><a name="_details"></a><h2>Detailed Description</h2> |
---|
373 | Binary Convolutional rate 1/n class. |
---|
374 | <p> |
---|
375 | The codes are given as feedforward encoders and given in the Proakis form. That is, the binary generators (K-tuples) are converted to octal integers. Observe that the constraint length (K) is defined as the number of memory cells plus one (as in Proakis).<p> |
---|
376 | Encoding is performed with the encode function. The default method for encoding is by adding a tail of K-1 zeros and also assume that the encoder starts in the zero state (the <a class="el" href="classitpp_1_1Convolutional__Code.html#47230acfea5aa32cb31e63abca1d222e" title="Encoding that starts and ends in the zero state.">encode_tail()</a> function). Observe that <a class="el" href="classitpp_1_1Convolutional__Code.html#f3bf2206a471342563a4080e42d6b435" title="Decode a bvec of coded data.">decode()</a> by default also assumes that a tail is added. Both encoding and decoding method can be changed by the <a class="el" href="classitpp_1_1Convolutional__Code.html#1c49283f24dddf4e8cee2835f9d26afe" title="Set encoding and decoding method (Trunc, Tail, or Tailbite).">set_method()</a> function.<p> |
---|
377 | Example of use: (rate 1/3 constraint length K=7 ODS code using <a class="el" href="classitpp_1_1BPSK.html" title="BPSK modulator with real symbols.">BPSK</a> over AWGN) <div class="fragment"><pre class="fragment"> BPSK bpsk; |
---|
378 | <a class="code" href="classitpp_1_1Convolutional__Code.html#7fa593431fe01986a69247a493d88bae" title="Default constructor - sets (0133,0171) code with tail.">Convolutional_Code</a> code; |
---|
379 | ivec generator(3); |
---|
380 | generator(0)=0133; |
---|
381 | generator(1)=0165; |
---|
382 | generator(2)=0171; |
---|
383 | code.set_generator_polynomials(generator, 7); |
---|
384 | |
---|
385 | bvec bits=<a class="code" href="group__randgen.html#g5aa06887cf1fd3301b040987924068f0" title="Generates a random bit (equally likely 0s and 1s).">randb</a>(100), encoded_bits, decoded_bits; |
---|
386 | vec tx_signal, rx_signal; |
---|
387 | |
---|
388 | code.encode_tail(bits, encoded_bits); |
---|
389 | tx_signal = bpsk.modulate_bits(encoded_bits); |
---|
390 | rx_signal = tx_signal + <a class="code" href="group__miscfunc.html#gf559d29ca56ad3396a4284964b01a9b0" title="Square root of the elements.">sqrt</a>(0.5)*<a class="code" href="group__randgen.html#g9ecf5af23567f51abc9af737fdbd872a" title="Generates a random Gaussian (0,1) variable.">randn</a>(tx_signal.size()); |
---|
391 | code.decode_tail(rx_signal, decoded_bits); |
---|
392 | </pre></div><p> |
---|
393 | Comment: ODS-code stand for Optimum Distance Spectrum Code. For details see T. Ottosson, "Coding, Modulation and Multiuser Decoding for DS-CDMA Systems," Ph.d. thesis, Department of Information Theory, Scool of Electrical and Computer Engineering, Chalmers University of Technology, Goteborg 1997.<p> |
---|
394 | It is also possible to set the generator polynomials directly using the builtin tables which consists of: Maximum Free Distance (MFD) Codes of rates R=1/2 through R=1/8 and Optimum Distance Spectrum (ODS) Codes of rates R=1/2 through R=1/4. <hr><h2>Member Function Documentation</h2> |
---|
395 | <a class="anchor" name="3f442fd4218c746dc046ea996f301cf7"></a><!-- doxytag: member="itpp::Convolutional_Code::calculate_spectrum" ref="3f442fd4218c746dc046ea996f301cf7" args="(Array< ivec > &spectrum, int dmax, int no_terms)" --> |
---|
396 | <div class="memitem"> |
---|
397 | <div class="memproto"> |
---|
398 | <table class="memname"> |
---|
399 | <tr> |
---|
400 | <td class="memname">void itpp::Convolutional_Code::calculate_spectrum </td> |
---|
401 | <td>(</td> |
---|
402 | <td class="paramtype"><a class="el" href="classitpp_1_1Array.html">Array</a>< ivec > & </td> |
---|
403 | <td class="paramname"> <em>spectrum</em>, </td> |
---|
404 | </tr> |
---|
405 | <tr> |
---|
406 | <td class="paramkey"></td> |
---|
407 | <td></td> |
---|
408 | <td class="paramtype">int </td> |
---|
409 | <td class="paramname"> <em>dmax</em>, </td> |
---|
410 | </tr> |
---|
411 | <tr> |
---|
412 | <td class="paramkey"></td> |
---|
413 | <td></td> |
---|
414 | <td class="paramtype">int </td> |
---|
415 | <td class="paramname"> <em>no_terms</em></td><td> </td> |
---|
416 | </tr> |
---|
417 | <tr> |
---|
418 | <td></td> |
---|
419 | <td>)</td> |
---|
420 | <td></td><td></td><td></td> |
---|
421 | </tr> |
---|
422 | </table> |
---|
423 | </div> |
---|
424 | <div class="memdoc"> |
---|
425 | |
---|
426 | <p> |
---|
427 | Calculate spectrum. |
---|
428 | <p> |
---|
429 | Calculates both the weight spectrum (Ad) and the information weight spectrum (Cd) and returns it as ivec:s in the 0:th and 1:st component of spectrum, respectively. Suitable for calculating many terms in the spectra (uses an breadth first algorithm). It is assumed that the code is non-catastrophic or else it is a possibility for an eternal loop. dmax = an upper bound on the free distance no_terms = no_terms including the dmax term that should be calculated<p> |
---|
430 | Observe that there is a risk that some of the integers are overflow if many terms are calculated in the spectrum. |
---|
431 | <p>Reimplemented in <a class="el" href="classitpp_1_1Punctured__Convolutional__Code.html#5b03f1aa26a5521cdcab6298d94926c9">itpp::Punctured_Convolutional_Code</a>.</p> |
---|
432 | |
---|
433 | <p>References <a class="el" href="convcode_8h-source.html#l00413">m</a>, <a class="el" href="convcode_8h-source.html#l00372">next_state()</a>, <a class="el" href="convcode_8h-source.html#l00415">no_states</a>, <a class="el" href="array_8h-source.html#l00257">itpp::Array< T >::set_size()</a>, <a class="el" href="sigfun_8cpp-source.html#l00297">itpp::spectrum()</a>, and <a class="el" href="convcode_8cpp-source.html#l00042">weight()</a>.</p> |
---|
434 | |
---|
435 | </div> |
---|
436 | </div><p> |
---|
437 | <a class="anchor" name="9f42d8c8bdb51460ebc7d43deb93bad7"></a><!-- doxytag: member="itpp::Convolutional_Code::decode_tail" ref="9f42d8c8bdb51460ebc7d43deb93bad7" args="(const vec &received_signal, bvec &output)" --> |
---|
438 | <div class="memitem"> |
---|
439 | <div class="memproto"> |
---|
440 | <table class="memname"> |
---|
441 | <tr> |
---|
442 | <td class="memname">void itpp::Convolutional_Code::decode_tail </td> |
---|
443 | <td>(</td> |
---|
444 | <td class="paramtype">const vec & </td> |
---|
445 | <td class="paramname"> <em>received_signal</em>, </td> |
---|
446 | </tr> |
---|
447 | <tr> |
---|
448 | <td class="paramkey"></td> |
---|
449 | <td></td> |
---|
450 | <td class="paramtype">bvec & </td> |
---|
451 | <td class="paramname"> <em>output</em></td><td> </td> |
---|
452 | </tr> |
---|
453 | <tr> |
---|
454 | <td></td> |
---|
455 | <td>)</td> |
---|
456 | <td></td><td></td><td><code> [virtual]</code></td> |
---|
457 | </tr> |
---|
458 | </table> |
---|
459 | </div> |
---|
460 | <div class="memdoc"> |
---|
461 | |
---|
462 | <p> |
---|
463 | Decode a block of encoded data where encode_tail has been used. |
---|
464 | <p> |
---|
465 | Thus is assumes a decoder start state of zero and that a tail of K-1 zeros has been added. No memory truncation. |
---|
466 | <p>Reimplemented in <a class="el" href="classitpp_1_1Punctured__Convolutional__Code.html#8c706434a618852db7304b6e699c0194">itpp::Punctured_Convolutional_Code</a>.</p> |
---|
467 | |
---|
468 | <p>References <a class="el" href="convcode_8cpp-source.html#l00213">calc_metric()</a>, <a class="el" href="convcode_8h-source.html#l00406">get_input()</a>, <a class="el" href="itassert_8h-source.html#l00117">it_error_if</a>, <a class="el" href="convcode_8h-source.html#l00413">m</a>, <a class="el" href="tcp_8h-source.html#l00117">itpp::max()</a>, <a class="el" href="array_8h-source.html#l00377">itpp::Array< T >::mid()</a>, <a class="el" href="convcode_8h-source.html#l00415">no_states</a>, <a class="el" href="convcode_8h-source.html#l00431">output_reverse_int</a>, <a class="el" href="convcode_8h-source.html#l00435">path_memory</a>, <a class="el" href="convcode_8h-source.html#l00376">previous_state()</a>, <a class="el" href="convcode_8h-source.html#l00439">sum_metric</a>, and <a class="el" href="convcode_8h-source.html#l00437">visited_state</a>.</p> |
---|
469 | |
---|
470 | <p>Referenced by <a class="el" href="convcode_8cpp-source.html#l00747">decode()</a>.</p> |
---|
471 | |
---|
472 | </div> |
---|
473 | </div><p> |
---|
474 | <a class="anchor" name="94f2b7f77dc08fc0fb975735762be742"></a><!-- doxytag: member="itpp::Convolutional_Code::decode_tailbite" ref="94f2b7f77dc08fc0fb975735762be742" args="(const vec &received_signal, bvec &output)" --> |
---|
475 | <div class="memitem"> |
---|
476 | <div class="memproto"> |
---|
477 | <table class="memname"> |
---|
478 | <tr> |
---|
479 | <td class="memname">void itpp::Convolutional_Code::decode_tailbite </td> |
---|
480 | <td>(</td> |
---|
481 | <td class="paramtype">const vec & </td> |
---|
482 | <td class="paramname"> <em>received_signal</em>, </td> |
---|
483 | </tr> |
---|
484 | <tr> |
---|
485 | <td class="paramkey"></td> |
---|
486 | <td></td> |
---|
487 | <td class="paramtype">bvec & </td> |
---|
488 | <td class="paramname"> <em>output</em></td><td> </td> |
---|
489 | </tr> |
---|
490 | <tr> |
---|
491 | <td></td> |
---|
492 | <td>)</td> |
---|
493 | <td></td><td></td><td><code> [virtual]</code></td> |
---|
494 | </tr> |
---|
495 | </table> |
---|
496 | </div> |
---|
497 | <div class="memdoc"> |
---|
498 | |
---|
499 | <p> |
---|
500 | Decode a block of encoded data where encode_tailbite has been used. |
---|
501 | <p> |
---|
502 | The decoding algorithm tries all start states, so the <a class="el" href="classitpp_1_1Convolutional__Code.html#94f2b7f77dc08fc0fb975735762be742" title="Decode a block of encoded data where encode_tailbite has been used.">decode_tailbite()</a> is <img class="formulaInl" alt="$2^{K-1}$" src="form_242.png"> times more complex than the decode_tail method. |
---|
503 | <p>Reimplemented in <a class="el" href="classitpp_1_1Punctured__Convolutional__Code.html#841c9437974ffa14ff10385e9729f59d">itpp::Punctured_Convolutional_Code</a>.</p> |
---|
504 | |
---|
505 | <p>References <a class="el" href="convcode_8cpp-source.html#l00213">calc_metric()</a>, <a class="el" href="convcode_8h-source.html#l00406">get_input()</a>, <a class="el" href="itassert_8h-source.html#l00117">it_error_if</a>, <a class="el" href="tcp_8h-source.html#l00117">itpp::max()</a>, <a class="el" href="convcode_8h-source.html#l00415">no_states</a>, <a class="el" href="convcode_8h-source.html#l00431">output_reverse_int</a>, <a class="el" href="convcode_8h-source.html#l00435">path_memory</a>, <a class="el" href="convcode_8h-source.html#l00376">previous_state()</a>, <a class="el" href="convcode_8h-source.html#l00439">sum_metric</a>, and <a class="el" href="convcode_8h-source.html#l00437">visited_state</a>.</p> |
---|
506 | |
---|
507 | <p>Referenced by <a class="el" href="convcode_8cpp-source.html#l00747">decode()</a>.</p> |
---|
508 | |
---|
509 | </div> |
---|
510 | </div><p> |
---|
511 | <a class="anchor" name="a6884e3f60678177fbf60e22d2447a5b"></a><!-- doxytag: member="itpp::Convolutional_Code::encode_bit" ref="a6884e3f60678177fbf60e22d2447a5b" args="(const bin &input, bvec &output)" --> |
---|
512 | <div class="memitem"> |
---|
513 | <div class="memproto"> |
---|
514 | <table class="memname"> |
---|
515 | <tr> |
---|
516 | <td class="memname">void itpp::Convolutional_Code::encode_bit </td> |
---|
517 | <td>(</td> |
---|
518 | <td class="paramtype">const <a class="el" href="classitpp_1_1bin.html">bin</a> & </td> |
---|
519 | <td class="paramname"> <em>input</em>, </td> |
---|
520 | </tr> |
---|
521 | <tr> |
---|
522 | <td class="paramkey"></td> |
---|
523 | <td></td> |
---|
524 | <td class="paramtype">bvec & </td> |
---|
525 | <td class="paramname"> <em>output</em></td><td> </td> |
---|
526 | </tr> |
---|
527 | <tr> |
---|
528 | <td></td> |
---|
529 | <td>)</td> |
---|
530 | <td></td><td></td><td></td> |
---|
531 | </tr> |
---|
532 | </table> |
---|
533 | </div> |
---|
534 | <div class="memdoc"> |
---|
535 | |
---|
536 | <p> |
---|
537 | Encode a binary bit starting from the internal encoder state. |
---|
538 | <p> |
---|
539 | To initialize the encoder state use <a class="el" href="classitpp_1_1Convolutional__Code.html#6316d7d75c01471aa44d533fdaa586c1" title="Set encoder default start state.">set_start_state()</a> and <a class="el" href="classitpp_1_1Convolutional__Code.html#9ef6fc1934531d3c12123ed90c5b4c40" title="Initialise internal encoder state with start state. Has no effect on Tail and Tailbite...">init_encoder()</a> |
---|
540 | <p>References <a class="el" href="convcode_8h-source.html#l00421">encoder_state</a>, <a class="el" href="convcode_8h-source.html#l00417">gen_pol</a>, <a class="el" href="convcode_8h-source.html#l00413">m</a>, and <a class="el" href="convcode_8h-source.html#l00429">xor_int_table</a>.</p> |
---|
541 | |
---|
542 | </div> |
---|
543 | </div><p> |
---|
544 | <a class="anchor" name="47230acfea5aa32cb31e63abca1d222e"></a><!-- doxytag: member="itpp::Convolutional_Code::encode_tail" ref="47230acfea5aa32cb31e63abca1d222e" args="(const bvec &input, bvec &output)" --> |
---|
545 | <div class="memitem"> |
---|
546 | <div class="memproto"> |
---|
547 | <table class="memname"> |
---|
548 | <tr> |
---|
549 | <td class="memname">void itpp::Convolutional_Code::encode_tail </td> |
---|
550 | <td>(</td> |
---|
551 | <td class="paramtype">const bvec & </td> |
---|
552 | <td class="paramname"> <em>input</em>, </td> |
---|
553 | </tr> |
---|
554 | <tr> |
---|
555 | <td class="paramkey"></td> |
---|
556 | <td></td> |
---|
557 | <td class="paramtype">bvec & </td> |
---|
558 | <td class="paramname"> <em>output</em></td><td> </td> |
---|
559 | </tr> |
---|
560 | <tr> |
---|
561 | <td></td> |
---|
562 | <td>)</td> |
---|
563 | <td></td><td></td><td></td> |
---|
564 | </tr> |
---|
565 | </table> |
---|
566 | </div> |
---|
567 | <div class="memdoc"> |
---|
568 | |
---|
569 | <p> |
---|
570 | Encoding that starts and ends in the zero state. |
---|
571 | <p> |
---|
572 | Encode a binary vector of inputs starting from zero state and also adds a tail of K-1 zeros to force the encoder into the zero state. Well suited for packet transmission.<p> |
---|
573 | <dl class="note" compact><dt><b>Note:</b></dt><dd>The <a class="el" href="classitpp_1_1Convolutional__Code.html#9ef6fc1934531d3c12123ed90c5b4c40" title="Initialise internal encoder state with start state. Has no effect on Tail and Tailbite...">init_encoder()</a> function has no effect on the starting state for this method. </dd></dl> |
---|
574 | |
---|
575 | <p>Reimplemented in <a class="el" href="classitpp_1_1Punctured__Convolutional__Code.html#eda7709de1cff7c6211884f9acfae470">itpp::Punctured_Convolutional_Code</a>.</p> |
---|
576 | |
---|
577 | <p>References <a class="el" href="convcode_8h-source.html#l00421">encoder_state</a>, <a class="el" href="convcode_8h-source.html#l00417">gen_pol</a>, <a class="el" href="convcode_8h-source.html#l00413">m</a>, and <a class="el" href="convcode_8h-source.html#l00429">xor_int_table</a>.</p> |
---|
578 | |
---|
579 | <p>Referenced by <a class="el" href="convcode_8cpp-source.html#l00619">encode()</a>.</p> |
---|
580 | |
---|
581 | </div> |
---|
582 | </div><p> |
---|
583 | <a class="anchor" name="34e2691d01bc0b35d81f109f27bedfa2"></a><!-- doxytag: member="itpp::Convolutional_Code::encode_tailbite" ref="34e2691d01bc0b35d81f109f27bedfa2" args="(const bvec &input, bvec &output)" --> |
---|
584 | <div class="memitem"> |
---|
585 | <div class="memproto"> |
---|
586 | <table class="memname"> |
---|
587 | <tr> |
---|
588 | <td class="memname">void itpp::Convolutional_Code::encode_tailbite </td> |
---|
589 | <td>(</td> |
---|
590 | <td class="paramtype">const bvec & </td> |
---|
591 | <td class="paramname"> <em>input</em>, </td> |
---|
592 | </tr> |
---|
593 | <tr> |
---|
594 | <td class="paramkey"></td> |
---|
595 | <td></td> |
---|
596 | <td class="paramtype">bvec & </td> |
---|
597 | <td class="paramname"> <em>output</em></td><td> </td> |
---|
598 | </tr> |
---|
599 | <tr> |
---|
600 | <td></td> |
---|
601 | <td>)</td> |
---|
602 | <td></td><td></td><td></td> |
---|
603 | </tr> |
---|
604 | </table> |
---|
605 | </div> |
---|
606 | <div class="memdoc"> |
---|
607 | |
---|
608 | <p> |
---|
609 | Encode an input binary vector using tailbiting. |
---|
610 | <p> |
---|
611 | In the Tailbiting method the starting state of the encoder is initialised with the last K-1 bits of the input vector. This gives an additional information to the decoder that the starting and ending states are identical, although not known a priori.<p> |
---|
612 | Well suited for packet transmission with small packets, because there is no tail overhead as in the Tail method.<p> |
---|
613 | <dl class="note" compact><dt><b>Note:</b></dt><dd>The <a class="el" href="classitpp_1_1Convolutional__Code.html#9ef6fc1934531d3c12123ed90c5b4c40" title="Initialise internal encoder state with start state. Has no effect on Tail and Tailbite...">init_encoder()</a> function has no effect on the starting state for this method. </dd></dl> |
---|
614 | |
---|
615 | <p>Reimplemented in <a class="el" href="classitpp_1_1Punctured__Convolutional__Code.html#60feaefdc4f8b62884268f7cc0ea8296">itpp::Punctured_Convolutional_Code</a>.</p> |
---|
616 | |
---|
617 | <p>References <a class="el" href="convcode_8h-source.html#l00421">encoder_state</a>, <a class="el" href="convcode_8h-source.html#l00417">gen_pol</a>, <a class="el" href="convcode_8h-source.html#l00413">m</a>, and <a class="el" href="convcode_8h-source.html#l00429">xor_int_table</a>.</p> |
---|
618 | |
---|
619 | <p>Referenced by <a class="el" href="convcode_8cpp-source.html#l00619">encode()</a>.</p> |
---|
620 | |
---|
621 | </div> |
---|
622 | </div><p> |
---|
623 | <a class="anchor" name="b2acc3b632782ff035fa1b5b2b122153"></a><!-- doxytag: member="itpp::Convolutional_Code::encode_trunc" ref="b2acc3b632782ff035fa1b5b2b122153" args="(const bvec &input, bvec &output)" --> |
---|
624 | <div class="memitem"> |
---|
625 | <div class="memproto"> |
---|
626 | <table class="memname"> |
---|
627 | <tr> |
---|
628 | <td class="memname">void itpp::Convolutional_Code::encode_trunc </td> |
---|
629 | <td>(</td> |
---|
630 | <td class="paramtype">const bvec & </td> |
---|
631 | <td class="paramname"> <em>input</em>, </td> |
---|
632 | </tr> |
---|
633 | <tr> |
---|
634 | <td class="paramkey"></td> |
---|
635 | <td></td> |
---|
636 | <td class="paramtype">bvec & </td> |
---|
637 | <td class="paramname"> <em>output</em></td><td> </td> |
---|
638 | </tr> |
---|
639 | <tr> |
---|
640 | <td></td> |
---|
641 | <td>)</td> |
---|
642 | <td></td><td></td><td></td> |
---|
643 | </tr> |
---|
644 | </table> |
---|
645 | </div> |
---|
646 | <div class="memdoc"> |
---|
647 | |
---|
648 | <p> |
---|
649 | Encode a binary vector starting from the previous encoder state. |
---|
650 | <p> |
---|
651 | The initial encoder state can be changed using <a class="el" href="classitpp_1_1Convolutional__Code.html#6316d7d75c01471aa44d533fdaa586c1" title="Set encoder default start state.">set_start_state()</a> and <a class="el" href="classitpp_1_1Convolutional__Code.html#9ef6fc1934531d3c12123ed90c5b4c40" title="Initialise internal encoder state with start state. Has no effect on Tail and Tailbite...">init_encoder()</a> functions. |
---|
652 | <p>Reimplemented in <a class="el" href="classitpp_1_1Punctured__Convolutional__Code.html#49dbb58e8a99c89502140e8f2d527503">itpp::Punctured_Convolutional_Code</a>.</p> |
---|
653 | |
---|
654 | <p>References <a class="el" href="convcode_8h-source.html#l00421">encoder_state</a>, <a class="el" href="convcode_8h-source.html#l00417">gen_pol</a>, <a class="el" href="convcode_8h-source.html#l00413">m</a>, and <a class="el" href="convcode_8h-source.html#l00429">xor_int_table</a>.</p> |
---|
655 | |
---|
656 | <p>Referenced by <a class="el" href="convcode_8cpp-source.html#l00619">encode()</a>.</p> |
---|
657 | |
---|
658 | </div> |
---|
659 | </div><p> |
---|
660 | <a class="anchor" name="8217a8922992b1fb4faa28d86f21e6d7"></a><!-- doxytag: member="itpp::Convolutional_Code::fast" ref="8217a8922992b1fb4faa28d86f21e6d7" args="(Array< ivec > &spectrum, const int dfree, const int no_terms, const int Cdfree=1000000, const bool test_catastrophic=false)" --> |
---|
661 | <div class="memitem"> |
---|
662 | <div class="memproto"> |
---|
663 | <table class="memname"> |
---|
664 | <tr> |
---|
665 | <td class="memname">int itpp::Convolutional_Code::fast </td> |
---|
666 | <td>(</td> |
---|
667 | <td class="paramtype"><a class="el" href="classitpp_1_1Array.html">Array</a>< ivec > & </td> |
---|
668 | <td class="paramname"> <em>spectrum</em>, </td> |
---|
669 | </tr> |
---|
670 | <tr> |
---|
671 | <td class="paramkey"></td> |
---|
672 | <td></td> |
---|
673 | <td class="paramtype">const int </td> |
---|
674 | <td class="paramname"> <em>dfree</em>, </td> |
---|
675 | </tr> |
---|
676 | <tr> |
---|
677 | <td class="paramkey"></td> |
---|
678 | <td></td> |
---|
679 | <td class="paramtype">const int </td> |
---|
680 | <td class="paramname"> <em>no_terms</em>, </td> |
---|
681 | </tr> |
---|
682 | <tr> |
---|
683 | <td class="paramkey"></td> |
---|
684 | <td></td> |
---|
685 | <td class="paramtype">const int </td> |
---|
686 | <td class="paramname"> <em>Cdfree</em> = <code>1000000</code>, </td> |
---|
687 | </tr> |
---|
688 | <tr> |
---|
689 | <td class="paramkey"></td> |
---|
690 | <td></td> |
---|
691 | <td class="paramtype">const bool </td> |
---|
692 | <td class="paramname"> <em>test_catastrophic</em> = <code>false</code></td><td> </td> |
---|
693 | </tr> |
---|
694 | <tr> |
---|
695 | <td></td> |
---|
696 | <td>)</td> |
---|
697 | <td></td><td></td><td></td> |
---|
698 | </tr> |
---|
699 | </table> |
---|
700 | </div> |
---|
701 | <div class="memdoc"> |
---|
702 | |
---|
703 | <p> |
---|
704 | Cederwall's fast algorithm. |
---|
705 | <p> |
---|
706 | Calculates both the weight spectrum (Ad) and the information weight spectrum (Cd) and returns it as ivec:s in the 0:th and 1:st component of spectrum, respectively. The FAST algorithm is good for calculating only a few terms in the spectrum. If many terms are desired, use calc_spectrum instead. The algorithm returns -1 if the code tested is worse that the input dfree and Cdfree. It returns 0 if the code MAY be catastrophic (assuming that test_catastrophic is true), and returns 1 if everything went right.<p> |
---|
707 | <ul> |
---|
708 | <li><code>dfree</code> the free distance of the code (or an upper bound) </li> |
---|
709 | <li><code>no_terms</code> including the dfree term that should be calculated </li> |
---|
710 | <li><code>Cdfree</code> is the best value of information weight spectrum found so far</li> |
---|
711 | </ul> |
---|
712 | Observe that there is a risk that some of the integers are overflow if many terms are calculated in the spectrum.<p> |
---|
713 | See IT No. 6, pp. 1146-1159, Nov. 1989 for details. |
---|
714 | <p>References <a class="el" href="convcode_8cpp-source.html#l01130">distance_profile()</a>, <a class="el" href="convcode_8h-source.html#l00413">m</a>, <a class="el" href="convcode_8h-source.html#l00372">next_state()</a>, <a class="el" href="matfunc_8h-source.html#l00777">itpp::reverse()</a>, <a class="el" href="array_8h-source.html#l00257">itpp::Array< T >::set_size()</a>, <a class="el" href="sigfun_8cpp-source.html#l00297">itpp::spectrum()</a>, <a class="el" href="convcode_8cpp-source.html#l00042">weight()</a>, and <a class="el" href="convcode_8cpp-source.html#l00064">weight_reverse()</a>.</p> |
---|
715 | |
---|
716 | </div> |
---|
717 | </div><p> |
---|
718 | <a class="anchor" name="635406cac085c188709234c688ce2c68"></a><!-- doxytag: member="itpp::Convolutional_Code::inverse_tail" ref="635406cac085c188709234c688ce2c68" args="(const bvec coded_sequence, bvec &input)" --> |
---|
719 | <div class="memitem"> |
---|
720 | <div class="memproto"> |
---|
721 | <table class="memname"> |
---|
722 | <tr> |
---|
723 | <td class="memname">bool itpp::Convolutional_Code::inverse_tail </td> |
---|
724 | <td>(</td> |
---|
725 | <td class="paramtype">const bvec </td> |
---|
726 | <td class="paramname"> <em>coded_sequence</em>, </td> |
---|
727 | </tr> |
---|
728 | <tr> |
---|
729 | <td class="paramkey"></td> |
---|
730 | <td></td> |
---|
731 | <td class="paramtype">bvec & </td> |
---|
732 | <td class="paramname"> <em>input</em></td><td> </td> |
---|
733 | </tr> |
---|
734 | <tr> |
---|
735 | <td></td> |
---|
736 | <td>)</td> |
---|
737 | <td></td><td></td><td></td> |
---|
738 | </tr> |
---|
739 | </table> |
---|
740 | </div> |
---|
741 | <div class="memdoc"> |
---|
742 | |
---|
743 | <p> |
---|
744 | Calculate the inverse sequence. |
---|
745 | <p> |
---|
746 | Assumes that encode_tail is used in the encoding process. Returns false if there is an error in the coded sequence (not a valid codeword). Do not check that the tail forces the encoder into the zeroth state. |
---|
747 | <p>Reimplemented in <a class="el" href="classitpp_1_1Punctured__Convolutional__Code.html#b9fa55cd0b92e4d0db5debcd198184b1">itpp::Punctured_Convolutional_Code</a>.</p> |
---|
748 | |
---|
749 | <p>References <a class="el" href="convcode_8h-source.html#l00417">gen_pol</a>, <a class="el" href="itassert_8h-source.html#l00117">it_error_if</a>, <a class="el" href="convcode_8h-source.html#l00413">m</a>, and <a class="el" href="convcode_8h-source.html#l00429">xor_int_table</a>.</p> |
---|
750 | |
---|
751 | </div> |
---|
752 | </div><p> |
---|
753 | <a class="anchor" name="9860c6e22e6f7a58c020534045a432d0"></a><!-- doxytag: member="itpp::Convolutional_Code::set_code" ref="9860c6e22e6f7a58c020534045a432d0" args="(const CONVOLUTIONAL_CODE_TYPE type_of_code, int inverse_rate, int constraint_length)" --> |
---|
754 | <div class="memitem"> |
---|
755 | <div class="memproto"> |
---|
756 | <table class="memname"> |
---|
757 | <tr> |
---|
758 | <td class="memname">void itpp::Convolutional_Code::set_code </td> |
---|
759 | <td>(</td> |
---|
760 | <td class="paramtype">const <a class="el" href="group__fec.html#ge9651aa649deec69310af24cd89b8729">CONVOLUTIONAL_CODE_TYPE</a> </td> |
---|
761 | <td class="paramname"> <em>type_of_code</em>, </td> |
---|
762 | </tr> |
---|
763 | <tr> |
---|
764 | <td class="paramkey"></td> |
---|
765 | <td></td> |
---|
766 | <td class="paramtype">int </td> |
---|
767 | <td class="paramname"> <em>inverse_rate</em>, </td> |
---|
768 | </tr> |
---|
769 | <tr> |
---|
770 | <td class="paramkey"></td> |
---|
771 | <td></td> |
---|
772 | <td class="paramtype">int </td> |
---|
773 | <td class="paramname"> <em>constraint_length</em></td><td> </td> |
---|
774 | </tr> |
---|
775 | <tr> |
---|
776 | <td></td> |
---|
777 | <td>)</td> |
---|
778 | <td></td><td></td><td></td> |
---|
779 | </tr> |
---|
780 | </table> |
---|
781 | </div> |
---|
782 | <div class="memdoc"> |
---|
783 | |
---|
784 | <p> |
---|
785 | Set the code according to built-in tables. |
---|
786 | <p> |
---|
787 | The <em>type_of_code</em> can be either <em>MFD</em> or <em>ODS</em> for maximum free distance codes (according to Proakis) or Optimum Distance Spectrum Codes according to Frenger, Orten and Ottosson. |
---|
788 | <p>Reimplemented in <a class="el" href="classitpp_1_1Punctured__Convolutional__Code.html#3b8b66d056a2cde7ad92a8b6ce0c19ba">itpp::Punctured_Convolutional_Code</a>.</p> |
---|
789 | |
---|
790 | <p>References <a class="el" href="itassert_8h-source.html#l00094">it_assert</a>, and <a class="el" href="convcode_8cpp-source.html#l00552">set_generator_polynomials()</a>.</p> |
---|
791 | |
---|
792 | <p>Referenced by <a class="el" href="convcode_8h-source.html#l00106">Convolutional_Code()</a>.</p> |
---|
793 | |
---|
794 | </div> |
---|
795 | </div><p> |
---|
796 | <hr><h2>Friends And Related Function Documentation</h2> |
---|
797 | <a class="anchor" name="4abebe627013b4dfb5e1025c1f94c769"></a><!-- doxytag: member="itpp::Convolutional_Code::compare_spectra" ref="4abebe627013b4dfb5e1025c1f94c769" args="(ivec v1, ivec v2, vec weight_profile)" --> |
---|
798 | <div class="memitem"> |
---|
799 | <div class="memproto"> |
---|
800 | <table class="memname"> |
---|
801 | <tr> |
---|
802 | <td class="memname">int compare_spectra </td> |
---|
803 | <td>(</td> |
---|
804 | <td class="paramtype">ivec </td> |
---|
805 | <td class="paramname"> <em>v1</em>, </td> |
---|
806 | </tr> |
---|
807 | <tr> |
---|
808 | <td class="paramkey"></td> |
---|
809 | <td></td> |
---|
810 | <td class="paramtype">ivec </td> |
---|
811 | <td class="paramname"> <em>v2</em>, </td> |
---|
812 | </tr> |
---|
813 | <tr> |
---|
814 | <td class="paramkey"></td> |
---|
815 | <td></td> |
---|
816 | <td class="paramtype">vec </td> |
---|
817 | <td class="paramname"> <em>weight_profile</em></td><td> </td> |
---|
818 | </tr> |
---|
819 | <tr> |
---|
820 | <td></td> |
---|
821 | <td>)</td> |
---|
822 | <td></td><td></td><td><code> [related]</code></td> |
---|
823 | </tr> |
---|
824 | </table> |
---|
825 | </div> |
---|
826 | <div class="memdoc"> |
---|
827 | |
---|
828 | <p> |
---|
829 | Compare two distance spectra using a weight profile. |
---|
830 | <p> |
---|
831 | Return 1 if v1 is less, 0 if v2 less, and -1 if equal. |
---|
832 | </div> |
---|
833 | </div><p> |
---|
834 | <hr>The documentation for this class was generated from the following files:<ul> |
---|
835 | <li><a class="el" href="convcode_8h-source.html">convcode.h</a><li><a class="el" href="convcode_8cpp.html">convcode.cpp</a></ul> |
---|
836 | </div> |
---|
837 | <hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:02:19 2009 for mixpp by |
---|
838 | <a href="http://www.doxygen.org/index.html"> |
---|
839 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> |
---|
840 | </body> |
---|
841 | </html> |
---|