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: interleave.h Source File</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 | <h1>interleave.h</h1><a href="interleave_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 |
---|
66 | <a name="l00029"></a>00029 <span class="preprocessor">#ifndef INTERLEAVE_H</span> |
---|
67 | <a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define INTERLEAVE_H</span> |
---|
68 | <a name="l00031"></a>00031 <span class="preprocessor"></span> |
---|
69 | <a name="l00032"></a>00032 <span class="preprocessor">#ifndef _MSC_VER</span> |
---|
70 | <a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor"># include <itpp/config.h></span> |
---|
71 | <a name="l00034"></a>00034 <span class="preprocessor">#else</span> |
---|
72 | <a name="l00035"></a>00035 <span class="preprocessor"></span><span class="preprocessor"># include <itpp/config_msvc.h></span> |
---|
73 | <a name="l00036"></a>00036 <span class="preprocessor">#endif</span> |
---|
74 | <a name="l00037"></a>00037 <span class="preprocessor"></span> |
---|
75 | <a name="l00038"></a>00038 <span class="preprocessor">#include <<a class="code" href="vec_8h.html" title="Templated Vector Class Definitions.">itpp/base/vec.h</a>></span> |
---|
76 | <a name="l00039"></a>00039 <span class="preprocessor">#include <<a class="code" href="mat_8h.html" title="Matrix Class Definitions.">itpp/base/mat.h</a>></span> |
---|
77 | <a name="l00040"></a>00040 <span class="preprocessor">#include <<a class="code" href="random_8h.html" title="Definition of classes for random number generators.">itpp/base/random.h</a>></span> |
---|
78 | <a name="l00041"></a>00041 <span class="preprocessor">#include <<a class="code" href="sort_8h.html" title="Sorting functions.">itpp/base/sort.h</a>></span> |
---|
79 | <a name="l00042"></a>00042 |
---|
80 | <a name="l00043"></a>00043 |
---|
81 | <a name="l00044"></a>00044 <span class="keyword">namespace </span>itpp |
---|
82 | <a name="l00045"></a>00045 { |
---|
83 | <a name="l00046"></a>00046 |
---|
84 | <a name="l00066"></a>00066 <span class="keyword">template</span> <<span class="keyword">class</span> T> |
---|
85 | <a name="l00067"></a><a class="code" href="classitpp_1_1Block__Interleaver.html">00067</a> <span class="keyword">class </span><a class="code" href="classitpp_1_1Block__Interleaver.html" title="Block Interleaver Class.">Block_Interleaver</a> |
---|
86 | <a name="l00068"></a>00068 { |
---|
87 | <a name="l00069"></a>00069 <span class="keyword">public</span>: |
---|
88 | <a name="l00071"></a><a class="code" href="classitpp_1_1Block__Interleaver.html#3129ee09a9e830fcef08dae71ddaaa3e">00071</a> <a class="code" href="classitpp_1_1Block__Interleaver.html#3129ee09a9e830fcef08dae71ddaaa3e" title="Block_Interleaver constructor.">Block_Interleaver</a>(<span class="keywordtype">void</span>) {rows = 0; cols = 0;}; |
---|
89 | <a name="l00073"></a>00073 <a class="code" href="classitpp_1_1Block__Interleaver.html#3129ee09a9e830fcef08dae71ddaaa3e" title="Block_Interleaver constructor.">Block_Interleaver</a>(<span class="keywordtype">int</span> in_rows, <span class="keywordtype">int</span> in_cols); |
---|
90 | <a name="l00075"></a>00075 <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> <a class="code" href="classitpp_1_1Block__Interleaver.html#250fc156ccb4545850f0d9e72495bec3" title="Function for block interleaving. May add some zeros.">interleave</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &input); |
---|
91 | <a name="l00077"></a>00077 <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Block__Interleaver.html#250fc156ccb4545850f0d9e72495bec3" title="Function for block interleaving. May add some zeros.">interleave</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &input, <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &output); |
---|
92 | <a name="l00079"></a>00079 <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> <a class="code" href="classitpp_1_1Block__Interleaver.html#0c82b6bed55a14a3f7b8580668ab4bc5" title="Function for block deinterleaving. Removes additional zeros if keepzeros = 0.">deinterleave</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &input, <span class="keywordtype">short</span> keepzeros = 0); |
---|
93 | <a name="l00081"></a>00081 <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Block__Interleaver.html#0c82b6bed55a14a3f7b8580668ab4bc5" title="Function for block deinterleaving. Removes additional zeros if keepzeros = 0.">deinterleave</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &input, <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &output, <span class="keywordtype">short</span> keepzeros = 0); |
---|
94 | <a name="l00083"></a><a class="code" href="classitpp_1_1Block__Interleaver.html#c52dd1b18110528bba6ce67937d14024">00083</a> <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Block__Interleaver.html#c52dd1b18110528bba6ce67937d14024" title="Set the number of rows for block interleaving.">set_rows</a>(<span class="keywordtype">int</span> in_rows) {rows = in_rows;}; |
---|
95 | <a name="l00085"></a><a class="code" href="classitpp_1_1Block__Interleaver.html#7c933fa3a6bec600b3eb0fbfd62ad786">00085</a> <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Block__Interleaver.html#7c933fa3a6bec600b3eb0fbfd62ad786" title="Set the number of columns for block interleaving.">set_cols</a>(<span class="keywordtype">int</span> in_cols) {cols = in_cols;}; |
---|
96 | <a name="l00087"></a><a class="code" href="classitpp_1_1Block__Interleaver.html#82b4f68808a621ffa07f99ff93f61e16">00087</a> <span class="keywordtype">int</span> <a class="code" href="classitpp_1_1Block__Interleaver.html#82b4f68808a621ffa07f99ff93f61e16" title="Get the number of rows for block interleaving.">get_rows</a>(<span class="keywordtype">void</span>) {<span class="keywordflow">return</span> rows;}; |
---|
97 | <a name="l00089"></a><a class="code" href="classitpp_1_1Block__Interleaver.html#aa474881a1f9ffa9132850096dc16bb5">00089</a> <span class="keywordtype">int</span> <a class="code" href="classitpp_1_1Block__Interleaver.html#aa474881a1f9ffa9132850096dc16bb5" title="Get the number of columns for block interleaving.">get_cols</a>(<span class="keywordtype">void</span>) {<span class="keywordflow">return</span> cols;}; |
---|
98 | <a name="l00090"></a>00090 <span class="keyword">private</span>: |
---|
99 | <a name="l00091"></a>00091 <span class="keywordtype">int</span> rows, cols, input_length; |
---|
100 | <a name="l00092"></a>00092 }; |
---|
101 | <a name="l00093"></a>00093 |
---|
102 | <a name="l00113"></a>00113 <span class="keyword">template</span> <<span class="keyword">class</span> T> |
---|
103 | <a name="l00114"></a><a class="code" href="classitpp_1_1Cross__Interleaver.html">00114</a> <span class="keyword">class </span><a class="code" href="classitpp_1_1Cross__Interleaver.html" title="Cross Interleaver Class.">Cross_Interleaver</a> |
---|
104 | <a name="l00115"></a>00115 { |
---|
105 | <a name="l00116"></a>00116 <span class="keyword">public</span>: |
---|
106 | <a name="l00118"></a><a class="code" href="classitpp_1_1Cross__Interleaver.html#22b57ef3b6eb6dea86ea21936a74c78b">00118</a> <a class="code" href="classitpp_1_1Cross__Interleaver.html#22b57ef3b6eb6dea86ea21936a74c78b" title="Cross_Interleaver constructor.">Cross_Interleaver</a>(<span class="keywordtype">void</span>) {order = 0;}; |
---|
107 | <a name="l00120"></a>00120 <a class="code" href="classitpp_1_1Cross__Interleaver.html#22b57ef3b6eb6dea86ea21936a74c78b" title="Cross_Interleaver constructor.">Cross_Interleaver</a>(<span class="keywordtype">int</span> in_order); |
---|
108 | <a name="l00122"></a>00122 <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> <a class="code" href="classitpp_1_1Cross__Interleaver.html#98183b39678bcac4c8f318a262fcd720" title="Function for cross interleaving. Adds some zeros.">interleave</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &input); |
---|
109 | <a name="l00124"></a>00124 <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Cross__Interleaver.html#98183b39678bcac4c8f318a262fcd720" title="Function for cross interleaving. Adds some zeros.">interleave</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &input, <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &output); |
---|
110 | <a name="l00126"></a>00126 <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> <a class="code" href="classitpp_1_1Cross__Interleaver.html#850e2ed09d92d38bdb60d9c04cd01d98" title="Function for cross deinterleaving. Removes aditional zeros if keepzeros = 0.">deinterleave</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &input, <span class="keywordtype">short</span> keepzeros = 0); |
---|
111 | <a name="l00128"></a>00128 <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Cross__Interleaver.html#850e2ed09d92d38bdb60d9c04cd01d98" title="Function for cross deinterleaving. Removes aditional zeros if keepzeros = 0.">deinterleave</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &input, <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &output, <span class="keywordtype">short</span> keepzeros = 0); |
---|
112 | <a name="l00130"></a>00130 <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Cross__Interleaver.html#00ce58e6070c0dbeb8da1095a4524149" title="Set the order of the Cross Interleaver.">set_order</a>(<span class="keywordtype">int</span> in_order); |
---|
113 | <a name="l00132"></a><a class="code" href="classitpp_1_1Cross__Interleaver.html#17bc830de40d92f7e58c859dba1407bc">00132</a> <span class="keywordtype">int</span> <a class="code" href="classitpp_1_1Cross__Interleaver.html#17bc830de40d92f7e58c859dba1407bc" title="Get the order of the Cross Interleaver.">get_order</a>(<span class="keywordtype">void</span>) {<span class="keywordflow">return</span> order;}; |
---|
114 | <a name="l00133"></a>00133 <span class="keyword">private</span>: |
---|
115 | <a name="l00134"></a>00134 <span class="keywordtype">int</span> order; |
---|
116 | <a name="l00135"></a>00135 <span class="keywordtype">int</span> input_length; |
---|
117 | <a name="l00136"></a>00136 <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> inter_matrix; |
---|
118 | <a name="l00137"></a>00137 <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> tempvec, zerostemp; |
---|
119 | <a name="l00138"></a>00138 }; |
---|
120 | <a name="l00139"></a>00139 |
---|
121 | <a name="l00156"></a>00156 <span class="keyword">template</span> <<span class="keyword">class</span> T> |
---|
122 | <a name="l00157"></a><a class="code" href="classitpp_1_1Sequence__Interleaver.html">00157</a> <span class="keyword">class </span><a class="code" href="classitpp_1_1Sequence__Interleaver.html" title="Sequence Interleaver Class.">Sequence_Interleaver</a> |
---|
123 | <a name="l00158"></a>00158 { |
---|
124 | <a name="l00159"></a>00159 <span class="keyword">public</span>: |
---|
125 | <a name="l00161"></a><a class="code" href="classitpp_1_1Sequence__Interleaver.html#5a2944c1c1dc62bb6c948e56b4785a0c">00161</a> <a class="code" href="classitpp_1_1Sequence__Interleaver.html#5a2944c1c1dc62bb6c948e56b4785a0c" title="Sequence_Interleaver constructor.">Sequence_Interleaver</a>(<span class="keywordtype">void</span>) {interleaver_depth = 0;}; |
---|
126 | <a name="l00167"></a>00167 <a class="code" href="classitpp_1_1Sequence__Interleaver.html#5a2944c1c1dc62bb6c948e56b4785a0c" title="Sequence_Interleaver constructor.">Sequence_Interleaver</a>(<span class="keywordtype">int</span> in_interleaver_depth); |
---|
127 | <a name="l00173"></a>00173 <a class="code" href="classitpp_1_1Sequence__Interleaver.html#5a2944c1c1dc62bb6c948e56b4785a0c" title="Sequence_Interleaver constructor.">Sequence_Interleaver</a>(ivec in_interleaver_sequence); |
---|
128 | <a name="l00175"></a>00175 <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> <a class="code" href="classitpp_1_1Sequence__Interleaver.html#3436faf70c53400695f0c54ee9c0fb64" title="Function for sequence interleaving. May add some zeros.">interleave</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &input); |
---|
129 | <a name="l00177"></a>00177 <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Sequence__Interleaver.html#3436faf70c53400695f0c54ee9c0fb64" title="Function for sequence interleaving. May add some zeros.">interleave</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &input, <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &output); |
---|
130 | <a name="l00179"></a>00179 <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> <a class="code" href="classitpp_1_1Sequence__Interleaver.html#8394055c94d125c12995bf418dc356c0" title="Function for sequence deinterleaving. Removes additional zeros if keepzeros = 0.">deinterleave</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &input, <span class="keywordtype">short</span> keepzeros = 0); |
---|
131 | <a name="l00181"></a>00181 <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Sequence__Interleaver.html#8394055c94d125c12995bf418dc356c0" title="Function for sequence deinterleaving. Removes additional zeros if keepzeros = 0.">deinterleave</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &input, <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &output, <span class="keywordtype">short</span> keepzeros = 0); |
---|
132 | <a name="l00183"></a>00183 <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Sequence__Interleaver.html#f68f9acbac21192d93de9284db930340" title="Generate a new random sequence for interleaving.">randomize_interleaver_sequence</a>(); |
---|
133 | <a name="l00185"></a>00185 ivec <a class="code" href="classitpp_1_1Sequence__Interleaver.html#ccff537b7dd07bbc1d34ec343e7df63a" title="Returns the interleaver sequence presently used.">get_interleaver_sequence</a>(); |
---|
134 | <a name="l00187"></a>00187 <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Sequence__Interleaver.html#db47d1227f4a2b47a2a2aff225ca5bf5" title="Set the interleaver sequence to be used.">set_interleaver_sequence</a>(ivec in_interleaver_sequence); |
---|
135 | <a name="l00189"></a><a class="code" href="classitpp_1_1Sequence__Interleaver.html#16ae0b10d8296ce5bc5cd371e64cca2b">00189</a> <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Sequence__Interleaver.html#16ae0b10d8296ce5bc5cd371e64cca2b" title="Set the length of the interleaver sequence to be used.">set_interleaver_depth</a>(<span class="keywordtype">int</span> in_interleaver_depth) { interleaver_depth = in_interleaver_depth; }; |
---|
136 | <a name="l00191"></a><a class="code" href="classitpp_1_1Sequence__Interleaver.html#97559ad3aa356c53f32cc58d230e653d">00191</a> <span class="keywordtype">int</span> <a class="code" href="classitpp_1_1Sequence__Interleaver.html#97559ad3aa356c53f32cc58d230e653d" title="Get the length of the interleaver sequence presently used.">get_interleaver_depth</a>(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> interleaver_depth; }; |
---|
137 | <a name="l00192"></a>00192 <span class="keyword">private</span>: |
---|
138 | <a name="l00193"></a>00193 ivec interleaver_sequence; |
---|
139 | <a name="l00194"></a>00194 <span class="keywordtype">int</span> interleaver_depth, input_length; |
---|
140 | <a name="l00195"></a>00195 }; |
---|
141 | <a name="l00196"></a>00196 |
---|
142 | <a name="l00197"></a>00197 <span class="comment">//-----------------------------------------------------------------------------</span> |
---|
143 | <a name="l00198"></a>00198 <span class="comment">// Implementation of templated members starts here</span> |
---|
144 | <a name="l00199"></a>00199 <span class="comment">//-----------------------------------------------------------------------------</span> |
---|
145 | <a name="l00200"></a>00200 |
---|
146 | <a name="l00201"></a>00201 <span class="comment">//-------------------------- Block Interleaver ---------------------------------</span> |
---|
147 | <a name="l00202"></a>00202 |
---|
148 | <a name="l00203"></a>00203 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
149 | <a name="l00204"></a><a class="code" href="classitpp_1_1Block__Interleaver.html#26e8964f2fd3b94ae1f22c3529685f1f">00204</a> <a class="code" href="classitpp_1_1Block__Interleaver.html#3129ee09a9e830fcef08dae71ddaaa3e" title="Block_Interleaver constructor.">Block_Interleaver<T>::Block_Interleaver</a>(<span class="keywordtype">int</span> in_rows, <span class="keywordtype">int</span> in_cols) |
---|
150 | <a name="l00205"></a>00205 { |
---|
151 | <a name="l00206"></a>00206 rows = in_rows; |
---|
152 | <a name="l00207"></a>00207 cols = in_cols; |
---|
153 | <a name="l00208"></a>00208 input_length = 0; |
---|
154 | <a name="l00209"></a>00209 } |
---|
155 | <a name="l00210"></a>00210 |
---|
156 | <a name="l00211"></a>00211 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
157 | <a name="l00212"></a><a class="code" href="classitpp_1_1Block__Interleaver.html#8a9acdc9e5074a099be78f358149b1f7">00212</a> <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Block__Interleaver.html#250fc156ccb4545850f0d9e72495bec3" title="Function for block interleaving. May add some zeros.">Block_Interleaver<T>::interleave</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &input, <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &output) |
---|
158 | <a name="l00213"></a>00213 { |
---|
159 | <a name="l00214"></a>00214 input_length = input.<a class="code" href="classitpp_1_1Vec.html#44478ea086eda22a180102e77e352325" title="The size of the vector.">length</a>(); |
---|
160 | <a name="l00215"></a>00215 <span class="keywordtype">int</span> steps = (int)<a class="code" href="group__convertfunc.html#g0cb0ca1ce1f1218522ba2b1e0e1fe5a5" title="Round to nearest upper integer.">std::ceil</a>(<span class="keywordtype">double</span>(input_length) / double(rows * cols)); |
---|
161 | <a name="l00216"></a>00216 <span class="keywordtype">int</span> output_length = steps * rows * cols; |
---|
162 | <a name="l00217"></a>00217 output.<a class="code" href="classitpp_1_1Vec.html#d56d0d3d9f354d2401638c273f8ae200" title="Set length of vector. if copy = true then keeping the old values.">set_length</a>(output_length, <span class="keyword">false</span>); |
---|
163 | <a name="l00218"></a>00218 <span class="keywordtype">int</span> s, r, c; |
---|
164 | <a name="l00219"></a>00219 |
---|
165 | <a name="l00220"></a>00220 <span class="keywordflow">if</span> (input_length == output_length) { |
---|
166 | <a name="l00221"></a>00221 <span class="comment">//Block interleaver loop: All steps.</span> |
---|
167 | <a name="l00222"></a>00222 <span class="keywordflow">for</span> (s = 0; s < steps; s++) { |
---|
168 | <a name="l00223"></a>00223 <span class="keywordflow">for</span> (c = 0; c < cols; c++) { |
---|
169 | <a name="l00224"></a>00224 <span class="keywordflow">for</span> (r = 0; r < rows; r++) { |
---|
170 | <a name="l00225"></a>00225 output(s*rows*cols + r*cols + c) = input(s * rows * cols + c * rows + r); |
---|
171 | <a name="l00226"></a>00226 } |
---|
172 | <a name="l00227"></a>00227 } |
---|
173 | <a name="l00228"></a>00228 } |
---|
174 | <a name="l00229"></a>00229 } |
---|
175 | <a name="l00230"></a>00230 <span class="keywordflow">else</span> { |
---|
176 | <a name="l00231"></a>00231 <span class="comment">//Block interleaver loop: All, but the last, steps.</span> |
---|
177 | <a name="l00232"></a>00232 <span class="keywordflow">for</span> (s = 0; s < steps - 1; s++) { |
---|
178 | <a name="l00233"></a>00233 <span class="keywordflow">for</span> (c = 0; c < cols; c++) { |
---|
179 | <a name="l00234"></a>00234 <span class="keywordflow">for</span> (r = 0; r < rows; r++) { |
---|
180 | <a name="l00235"></a>00235 output(s*rows*cols + r*cols + c) = input(s * rows * cols + c * rows + r); |
---|
181 | <a name="l00236"></a>00236 } |
---|
182 | <a name="l00237"></a>00237 } |
---|
183 | <a name="l00238"></a>00238 } |
---|
184 | <a name="l00239"></a>00239 <span class="comment">//The last step.</span> |
---|
185 | <a name="l00240"></a>00240 <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> zerovect(output_length - input_length); |
---|
186 | <a name="l00241"></a>00241 zerovect.<a class="code" href="classitpp_1_1Vec.html#6f2f64c04ed8adb0d9be53e0266d875d" title="Set the vector to the all zero vector.">clear</a>(); |
---|
187 | <a name="l00242"></a>00242 <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> temp_last_input = concat(input.<a class="code" href="classitpp_1_1Vec.html#e134864ce9e73858efd329ab7183cace" title="Get the right nr elements from the vector.">right</a>(rows * cols - zerovect.<a class="code" href="classitpp_1_1Vec.html#44478ea086eda22a180102e77e352325" title="The size of the vector.">length</a>()), zerovect); |
---|
188 | <a name="l00243"></a>00243 <span class="keywordflow">for</span> (c = 0; c < cols; c++) { |
---|
189 | <a name="l00244"></a>00244 <span class="keywordflow">for</span> (r = 0; r < rows; r++) { |
---|
190 | <a name="l00245"></a>00245 output((steps - 1)*rows*cols + r*cols + c) = temp_last_input(c * rows + r); |
---|
191 | <a name="l00246"></a>00246 } |
---|
192 | <a name="l00247"></a>00247 } |
---|
193 | <a name="l00248"></a>00248 } |
---|
194 | <a name="l00249"></a>00249 } |
---|
195 | <a name="l00250"></a>00250 |
---|
196 | <a name="l00251"></a>00251 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
197 | <a name="l00252"></a><a class="code" href="classitpp_1_1Block__Interleaver.html#250fc156ccb4545850f0d9e72495bec3">00252</a> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> <a class="code" href="classitpp_1_1Block__Interleaver.html#250fc156ccb4545850f0d9e72495bec3" title="Function for block interleaving. May add some zeros.">Block_Interleaver<T>::interleave</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &input) |
---|
198 | <a name="l00253"></a>00253 { |
---|
199 | <a name="l00254"></a>00254 <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> output; |
---|
200 | <a name="l00255"></a>00255 <a class="code" href="classitpp_1_1Block__Interleaver.html#250fc156ccb4545850f0d9e72495bec3" title="Function for block interleaving. May add some zeros.">interleave</a>(input, output); |
---|
201 | <a name="l00256"></a>00256 <span class="keywordflow">return</span> output; |
---|
202 | <a name="l00257"></a>00257 } |
---|
203 | <a name="l00258"></a>00258 |
---|
204 | <a name="l00259"></a>00259 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
205 | <a name="l00260"></a><a class="code" href="classitpp_1_1Block__Interleaver.html#2befff97c52ed91c3c99727a5440fdc1">00260</a> <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Block__Interleaver.html#0c82b6bed55a14a3f7b8580668ab4bc5" title="Function for block deinterleaving. Removes additional zeros if keepzeros = 0.">Block_Interleaver<T>::deinterleave</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &input, <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &output, <span class="keywordtype">short</span> keepzeros) |
---|
206 | <a name="l00261"></a>00261 { |
---|
207 | <a name="l00262"></a>00262 <span class="keywordtype">int</span> thisinput_length = input.<a class="code" href="classitpp_1_1Vec.html#44478ea086eda22a180102e77e352325" title="The size of the vector.">length</a>(); |
---|
208 | <a name="l00263"></a>00263 <span class="keywordtype">int</span> steps = (int)<a class="code" href="group__convertfunc.html#g0cb0ca1ce1f1218522ba2b1e0e1fe5a5" title="Round to nearest upper integer.">std::ceil</a>(<span class="keywordtype">double</span>(thisinput_length) / double(rows * cols)); |
---|
209 | <a name="l00264"></a>00264 <span class="keywordtype">int</span> output_length = steps * rows * cols; |
---|
210 | <a name="l00265"></a>00265 output.<a class="code" href="classitpp_1_1Vec.html#a4b02b7819e540bb3853c15e6480ada6" title="Set length of vector. if copy = true then keeping the old values.">set_size</a>(output_length, <span class="keyword">false</span>); |
---|
211 | <a name="l00266"></a>00266 <span class="keywordtype">int</span> s, r, c; |
---|
212 | <a name="l00267"></a>00267 |
---|
213 | <a name="l00268"></a>00268 <span class="keywordflow">if</span> (thisinput_length == output_length) { |
---|
214 | <a name="l00269"></a>00269 <span class="comment">//Block deinterleaver loop: All, but the last, steps.</span> |
---|
215 | <a name="l00270"></a>00270 <span class="keywordflow">for</span> (s = 0; s < steps; s++) { |
---|
216 | <a name="l00271"></a>00271 <span class="keywordflow">for</span> (r = 0; r < rows; r++) { |
---|
217 | <a name="l00272"></a>00272 <span class="keywordflow">for</span> (c = 0; c < cols; c++) { |
---|
218 | <a name="l00273"></a>00273 output(s*rows*cols + c*rows + r) = input(s * rows * cols + r * cols + c); |
---|
219 | <a name="l00274"></a>00274 } |
---|
220 | <a name="l00275"></a>00275 } |
---|
221 | <a name="l00276"></a>00276 } |
---|
222 | <a name="l00277"></a>00277 } |
---|
223 | <a name="l00278"></a>00278 <span class="keywordflow">else</span> { |
---|
224 | <a name="l00279"></a>00279 <span class="comment">//Block deinterleaver loop: All, but the last, steps.</span> |
---|
225 | <a name="l00280"></a>00280 <span class="keywordflow">for</span> (s = 0; s < steps - 1; s++) { |
---|
226 | <a name="l00281"></a>00281 <span class="keywordflow">for</span> (r = 0; r < rows; r++) { |
---|
227 | <a name="l00282"></a>00282 <span class="keywordflow">for</span> (c = 0; c < cols; c++) { |
---|
228 | <a name="l00283"></a>00283 output(s*rows*cols + c*rows + r) = input(s * rows * cols + r * cols + c); |
---|
229 | <a name="l00284"></a>00284 } |
---|
230 | <a name="l00285"></a>00285 } |
---|
231 | <a name="l00286"></a>00286 } |
---|
232 | <a name="l00287"></a>00287 <span class="comment">//The last step.</span> |
---|
233 | <a name="l00288"></a>00288 <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> zerovect(output_length - thisinput_length); |
---|
234 | <a name="l00289"></a>00289 zerovect.<a class="code" href="classitpp_1_1Vec.html#6f2f64c04ed8adb0d9be53e0266d875d" title="Set the vector to the all zero vector.">clear</a>(); |
---|
235 | <a name="l00290"></a>00290 <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> temp_last_input = concat(input.<a class="code" href="classitpp_1_1Vec.html#e134864ce9e73858efd329ab7183cace" title="Get the right nr elements from the vector.">right</a>(rows * cols - zerovect.<a class="code" href="classitpp_1_1Vec.html#44478ea086eda22a180102e77e352325" title="The size of the vector.">length</a>()), zerovect); |
---|
236 | <a name="l00291"></a>00291 <span class="keywordflow">for</span> (r = 0; r < rows; r++) { |
---|
237 | <a name="l00292"></a>00292 <span class="keywordflow">for</span> (c = 0; c < cols; c++) { |
---|
238 | <a name="l00293"></a>00293 output((steps - 1)*rows*cols + c*rows + r) = temp_last_input(r * cols + c); |
---|
239 | <a name="l00294"></a>00294 } |
---|
240 | <a name="l00295"></a>00295 } |
---|
241 | <a name="l00296"></a>00296 } |
---|
242 | <a name="l00297"></a>00297 <span class="keywordflow">if</span> (keepzeros == 0) |
---|
243 | <a name="l00298"></a>00298 output.<a class="code" href="classitpp_1_1Vec.html#a4b02b7819e540bb3853c15e6480ada6" title="Set length of vector. if copy = true then keeping the old values.">set_size</a>(input_length, <span class="keyword">true</span>); |
---|
244 | <a name="l00299"></a>00299 } |
---|
245 | <a name="l00300"></a>00300 |
---|
246 | <a name="l00301"></a>00301 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
247 | <a name="l00302"></a><a class="code" href="classitpp_1_1Block__Interleaver.html#0c82b6bed55a14a3f7b8580668ab4bc5">00302</a> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> <a class="code" href="classitpp_1_1Block__Interleaver.html#0c82b6bed55a14a3f7b8580668ab4bc5" title="Function for block deinterleaving. Removes additional zeros if keepzeros = 0.">Block_Interleaver<T>::deinterleave</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &input, <span class="keywordtype">short</span> keepzeros) |
---|
248 | <a name="l00303"></a>00303 { |
---|
249 | <a name="l00304"></a>00304 <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> output; |
---|
250 | <a name="l00305"></a>00305 <a class="code" href="classitpp_1_1Block__Interleaver.html#0c82b6bed55a14a3f7b8580668ab4bc5" title="Function for block deinterleaving. Removes additional zeros if keepzeros = 0.">deinterleave</a>(input, output, keepzeros); |
---|
251 | <a name="l00306"></a>00306 <span class="keywordflow">return</span> output; |
---|
252 | <a name="l00307"></a>00307 } |
---|
253 | <a name="l00308"></a>00308 |
---|
254 | <a name="l00309"></a>00309 <span class="comment">//---------------------------- Cross Interleaver ---------------------------</span> |
---|
255 | <a name="l00310"></a>00310 |
---|
256 | <a name="l00311"></a>00311 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
257 | <a name="l00312"></a><a class="code" href="classitpp_1_1Cross__Interleaver.html#f2482a55ea22176a9212b189a35a3c7d">00312</a> <a class="code" href="classitpp_1_1Cross__Interleaver.html#22b57ef3b6eb6dea86ea21936a74c78b" title="Cross_Interleaver constructor.">Cross_Interleaver<T>::Cross_Interleaver</a>(<span class="keywordtype">int</span> in_order) |
---|
258 | <a name="l00313"></a>00313 { |
---|
259 | <a name="l00314"></a>00314 order = in_order; |
---|
260 | <a name="l00315"></a>00315 input_length = 0; |
---|
261 | <a name="l00316"></a>00316 inter_matrix.<a class="code" href="classitpp_1_1Mat.html#1136d376109f2af8843593bccf9de88f" title="Set size of matrix. If copy = true then keep the data before resizing.">set_size</a>(order, order, <span class="keyword">false</span>); |
---|
262 | <a name="l00317"></a>00317 tempvec.<a class="code" href="classitpp_1_1Vec.html#a4b02b7819e540bb3853c15e6480ada6" title="Set length of vector. if copy = true then keeping the old values.">set_size</a>(order, <span class="keyword">false</span>); |
---|
263 | <a name="l00318"></a>00318 zerostemp.<a class="code" href="classitpp_1_1Vec.html#a4b02b7819e540bb3853c15e6480ada6" title="Set length of vector. if copy = true then keeping the old values.">set_size</a>(order, <span class="keyword">false</span>); |
---|
264 | <a name="l00319"></a>00319 } |
---|
265 | <a name="l00320"></a>00320 |
---|
266 | <a name="l00321"></a>00321 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
267 | <a name="l00322"></a><a class="code" href="classitpp_1_1Cross__Interleaver.html#6268aac9b3e50ffd1ad1a33714851b87">00322</a> <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Cross__Interleaver.html#98183b39678bcac4c8f318a262fcd720" title="Function for cross interleaving. Adds some zeros.">Cross_Interleaver<T>::interleave</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &input, <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &output) |
---|
268 | <a name="l00323"></a>00323 { |
---|
269 | <a name="l00324"></a>00324 input_length = input.<a class="code" href="classitpp_1_1Vec.html#44478ea086eda22a180102e77e352325" title="The size of the vector.">length</a>(); |
---|
270 | <a name="l00325"></a>00325 <span class="keywordtype">int</span> steps = (int)<a class="code" href="group__convertfunc.html#g0cb0ca1ce1f1218522ba2b1e0e1fe5a5" title="Round to nearest upper integer.">std::ceil</a>(<span class="keywordtype">float</span>(input_length) / order) + order; |
---|
271 | <a name="l00326"></a>00326 <span class="keywordtype">int</span> output_length = steps * order; |
---|
272 | <a name="l00327"></a>00327 output.<a class="code" href="classitpp_1_1Vec.html#d56d0d3d9f354d2401638c273f8ae200" title="Set length of vector. if copy = true then keeping the old values.">set_length</a>(output_length, <span class="keyword">false</span>); |
---|
273 | <a name="l00328"></a>00328 <span class="keywordtype">int</span> i, r, c; |
---|
274 | <a name="l00329"></a>00329 |
---|
275 | <a name="l00330"></a>00330 inter_matrix.<a class="code" href="classitpp_1_1Mat.html#1682c299a3a2a65fef1764136ea8f344" title="Set matrix equal to the all zero matrix.">clear</a>(); |
---|
276 | <a name="l00331"></a>00331 zerostemp.<a class="code" href="classitpp_1_1Vec.html#6f2f64c04ed8adb0d9be53e0266d875d" title="Set the vector to the all zero vector.">clear</a>(); |
---|
277 | <a name="l00332"></a>00332 |
---|
278 | <a name="l00333"></a>00333 <span class="comment">//Cross interleaver loop:</span> |
---|
279 | <a name="l00334"></a>00334 <span class="keywordflow">for</span> (i = 0; i < steps; i++) { |
---|
280 | <a name="l00335"></a>00335 |
---|
281 | <a name="l00336"></a>00336 <span class="comment">//Shift the matrix to the right:</span> |
---|
282 | <a name="l00337"></a>00337 <span class="keywordflow">for</span> (c = order - 1; c > 0; c--) |
---|
283 | <a name="l00338"></a>00338 inter_matrix.<a class="code" href="classitpp_1_1Mat.html#4fb84a9b5cef1a6dc31bd7d5317bb077" title="Set column c to vector v.">set_col</a>(c, inter_matrix.<a class="code" href="classitpp_1_1Mat.html#095a4e54f39932b62633f7f4f252ab46" title="Get column c.">get_col</a>(c - 1)); |
---|
284 | <a name="l00339"></a>00339 |
---|
285 | <a name="l00340"></a>00340 <span class="comment">// Write the new data to the matrix</span> |
---|
286 | <a name="l00341"></a>00341 <span class="keywordflow">if</span> ((i*order + order) < input_length) |
---|
287 | <a name="l00342"></a>00342 tempvec = input.<a class="code" href="classitpp_1_1Vec.html#3a5569b0b51c771b4fe3084e12b29958" title="Get the middle part of vector from start including nr elements.">mid</a>(i * order, order); |
---|
288 | <a name="l00343"></a>00343 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((i*order) < input_length) |
---|
289 | <a name="l00344"></a>00344 tempvec = concat(input.<a class="code" href="classitpp_1_1Vec.html#e134864ce9e73858efd329ab7183cace" title="Get the right nr elements from the vector.">right</a>(input_length - i * order), zerostemp.<a class="code" href="classitpp_1_1Vec.html#97e621d2f0f4a3a94e2af115a93caccb" title="Get the left nr elements from the vector.">left</a>(order - (input_length - i * order))); |
---|
290 | <a name="l00345"></a>00345 <span class="keywordflow">else</span> |
---|
291 | <a name="l00346"></a>00346 tempvec.<a class="code" href="classitpp_1_1Vec.html#6f2f64c04ed8adb0d9be53e0266d875d" title="Set the vector to the all zero vector.">clear</a>(); |
---|
292 | <a name="l00347"></a>00347 inter_matrix.<a class="code" href="classitpp_1_1Mat.html#4fb84a9b5cef1a6dc31bd7d5317bb077" title="Set column c to vector v.">set_col</a>(0, tempvec); |
---|
293 | <a name="l00348"></a>00348 |
---|
294 | <a name="l00349"></a>00349 <span class="comment">//Read the matrix diagonal-wise:</span> |
---|
295 | <a name="l00350"></a>00350 <span class="keywordflow">for</span> (r = 0; r < order; r++) |
---|
296 | <a name="l00351"></a>00351 output(i*order + r) = inter_matrix(r, r); |
---|
297 | <a name="l00352"></a>00352 } |
---|
298 | <a name="l00353"></a>00353 } |
---|
299 | <a name="l00354"></a>00354 |
---|
300 | <a name="l00355"></a>00355 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
301 | <a name="l00356"></a><a class="code" href="classitpp_1_1Cross__Interleaver.html#98183b39678bcac4c8f318a262fcd720">00356</a> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> <a class="code" href="classitpp_1_1Cross__Interleaver.html#98183b39678bcac4c8f318a262fcd720" title="Function for cross interleaving. Adds some zeros.">Cross_Interleaver<T>::interleave</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &input) |
---|
302 | <a name="l00357"></a>00357 { |
---|
303 | <a name="l00358"></a>00358 <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> output; |
---|
304 | <a name="l00359"></a>00359 <a class="code" href="classitpp_1_1Cross__Interleaver.html#98183b39678bcac4c8f318a262fcd720" title="Function for cross interleaving. Adds some zeros.">interleave</a>(input, output); |
---|
305 | <a name="l00360"></a>00360 <span class="keywordflow">return</span> output; |
---|
306 | <a name="l00361"></a>00361 } |
---|
307 | <a name="l00362"></a>00362 |
---|
308 | <a name="l00363"></a>00363 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
309 | <a name="l00364"></a><a class="code" href="classitpp_1_1Cross__Interleaver.html#e174c5b1591bbb9de75a267a6ef1ee18">00364</a> <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Cross__Interleaver.html#850e2ed09d92d38bdb60d9c04cd01d98" title="Function for cross deinterleaving. Removes aditional zeros if keepzeros = 0.">Cross_Interleaver<T>::deinterleave</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &input, <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &output, <span class="keywordtype">short</span> keepzeros) |
---|
310 | <a name="l00365"></a>00365 { |
---|
311 | <a name="l00366"></a>00366 <span class="keywordtype">int</span> thisinput_length = input.<a class="code" href="classitpp_1_1Vec.html#44478ea086eda22a180102e77e352325" title="The size of the vector.">length</a>(); |
---|
312 | <a name="l00367"></a>00367 <span class="keywordtype">int</span> steps = (int)<a class="code" href="group__convertfunc.html#g0cb0ca1ce1f1218522ba2b1e0e1fe5a5" title="Round to nearest upper integer.">std::ceil</a>(<span class="keywordtype">float</span>(thisinput_length) / order) + order; |
---|
313 | <a name="l00368"></a>00368 <span class="keywordtype">int</span> output_length = steps * order; |
---|
314 | <a name="l00369"></a>00369 output.<a class="code" href="classitpp_1_1Vec.html#a4b02b7819e540bb3853c15e6480ada6" title="Set length of vector. if copy = true then keeping the old values.">set_size</a>(output_length, <span class="keyword">false</span>); |
---|
315 | <a name="l00370"></a>00370 <span class="keywordtype">int</span> i, r, c; |
---|
316 | <a name="l00371"></a>00371 |
---|
317 | <a name="l00372"></a>00372 inter_matrix.<a class="code" href="classitpp_1_1Mat.html#1682c299a3a2a65fef1764136ea8f344" title="Set matrix equal to the all zero matrix.">clear</a>(); |
---|
318 | <a name="l00373"></a>00373 zerostemp.<a class="code" href="classitpp_1_1Vec.html#6f2f64c04ed8adb0d9be53e0266d875d" title="Set the vector to the all zero vector.">clear</a>(); |
---|
319 | <a name="l00374"></a>00374 |
---|
320 | <a name="l00375"></a>00375 <span class="comment">//Cross interleaver loop:</span> |
---|
321 | <a name="l00376"></a>00376 <span class="keywordflow">for</span> (i = 0; i < steps; i++) { |
---|
322 | <a name="l00377"></a>00377 |
---|
323 | <a name="l00378"></a>00378 <span class="comment">//Shift the matrix to the right:</span> |
---|
324 | <a name="l00379"></a>00379 <span class="keywordflow">for</span> (c = order - 1; c > 0; c--) |
---|
325 | <a name="l00380"></a>00380 inter_matrix.<a class="code" href="classitpp_1_1Mat.html#4fb84a9b5cef1a6dc31bd7d5317bb077" title="Set column c to vector v.">set_col</a>(c, inter_matrix.<a class="code" href="classitpp_1_1Mat.html#095a4e54f39932b62633f7f4f252ab46" title="Get column c.">get_col</a>(c - 1)); |
---|
326 | <a name="l00381"></a>00381 |
---|
327 | <a name="l00382"></a>00382 <span class="comment">// Write the new data to the matrix</span> |
---|
328 | <a name="l00383"></a>00383 <span class="keywordflow">if</span> ((i*order + order) < thisinput_length) |
---|
329 | <a name="l00384"></a>00384 tempvec = input.<a class="code" href="classitpp_1_1Vec.html#3a5569b0b51c771b4fe3084e12b29958" title="Get the middle part of vector from start including nr elements.">mid</a>(i * order, order); |
---|
330 | <a name="l00385"></a>00385 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((i*order) < thisinput_length) |
---|
331 | <a name="l00386"></a>00386 tempvec = concat(input.<a class="code" href="classitpp_1_1Vec.html#e134864ce9e73858efd329ab7183cace" title="Get the right nr elements from the vector.">right</a>(thisinput_length - i * order), zerostemp.<a class="code" href="classitpp_1_1Vec.html#97e621d2f0f4a3a94e2af115a93caccb" title="Get the left nr elements from the vector.">left</a>(order - (thisinput_length - i * order))); |
---|
332 | <a name="l00387"></a>00387 <span class="keywordflow">else</span> |
---|
333 | <a name="l00388"></a>00388 tempvec.<a class="code" href="classitpp_1_1Vec.html#6f2f64c04ed8adb0d9be53e0266d875d" title="Set the vector to the all zero vector.">clear</a>(); |
---|
334 | <a name="l00389"></a>00389 inter_matrix.<a class="code" href="classitpp_1_1Mat.html#4fb84a9b5cef1a6dc31bd7d5317bb077" title="Set column c to vector v.">set_col</a>(0, tempvec); |
---|
335 | <a name="l00390"></a>00390 |
---|
336 | <a name="l00391"></a>00391 <span class="comment">//Read the matrix diagonal-wise:</span> |
---|
337 | <a name="l00392"></a>00392 <span class="keywordflow">for</span> (r = 0; r < order; r++) |
---|
338 | <a name="l00393"></a>00393 output(i*order + r) = inter_matrix(r, order - 1 - r); |
---|
339 | <a name="l00394"></a>00394 } |
---|
340 | <a name="l00395"></a>00395 <span class="keywordflow">if</span> (keepzeros == 0) |
---|
341 | <a name="l00396"></a>00396 output = output.<a class="code" href="classitpp_1_1Vec.html#3a5569b0b51c771b4fe3084e12b29958" title="Get the middle part of vector from start including nr elements.">mid</a>(<a class="code" href="group__convertfunc.html#gfba861d94f7752f6dfafcdf14b336ca5" title="Round to nearest integer and return imat.">round_i</a>(<a class="code" href="group__logexpfunc.html#g40f48a75172e7f8bc8e58ed54262a04d" title="Calculates x to the power of y (x^y).">std::pow</a>(<span class="keywordtype">double</span>(order), 2)) - order, input_length); |
---|
342 | <a name="l00397"></a>00397 } |
---|
343 | <a name="l00398"></a>00398 |
---|
344 | <a name="l00399"></a>00399 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
345 | <a name="l00400"></a><a class="code" href="classitpp_1_1Cross__Interleaver.html#850e2ed09d92d38bdb60d9c04cd01d98">00400</a> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> <a class="code" href="classitpp_1_1Cross__Interleaver.html#850e2ed09d92d38bdb60d9c04cd01d98" title="Function for cross deinterleaving. Removes aditional zeros if keepzeros = 0.">Cross_Interleaver<T>::deinterleave</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &input, <span class="keywordtype">short</span> keepzeros) |
---|
346 | <a name="l00401"></a>00401 { |
---|
347 | <a name="l00402"></a>00402 <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> output; |
---|
348 | <a name="l00403"></a>00403 <a class="code" href="classitpp_1_1Cross__Interleaver.html#850e2ed09d92d38bdb60d9c04cd01d98" title="Function for cross deinterleaving. Removes aditional zeros if keepzeros = 0.">deinterleave</a>(input, output, keepzeros); |
---|
349 | <a name="l00404"></a>00404 <span class="keywordflow">return</span> output; |
---|
350 | <a name="l00405"></a>00405 } |
---|
351 | <a name="l00406"></a>00406 |
---|
352 | <a name="l00407"></a>00407 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
353 | <a name="l00408"></a><a class="code" href="classitpp_1_1Cross__Interleaver.html#00ce58e6070c0dbeb8da1095a4524149">00408</a> <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Cross__Interleaver.html#00ce58e6070c0dbeb8da1095a4524149" title="Set the order of the Cross Interleaver.">Cross_Interleaver<T>::set_order</a>(<span class="keywordtype">int</span> in_order) |
---|
354 | <a name="l00409"></a>00409 { |
---|
355 | <a name="l00410"></a>00410 order = in_order; |
---|
356 | <a name="l00411"></a>00411 input_length = 0; |
---|
357 | <a name="l00412"></a>00412 inter_matrix.<a class="code" href="classitpp_1_1Mat.html#1136d376109f2af8843593bccf9de88f" title="Set size of matrix. If copy = true then keep the data before resizing.">set_size</a>(order, order, <span class="keyword">false</span>); |
---|
358 | <a name="l00413"></a>00413 tempvec.<a class="code" href="classitpp_1_1Vec.html#a4b02b7819e540bb3853c15e6480ada6" title="Set length of vector. if copy = true then keeping the old values.">set_size</a>(order, <span class="keyword">false</span>); |
---|
359 | <a name="l00414"></a>00414 zerostemp.<a class="code" href="classitpp_1_1Vec.html#a4b02b7819e540bb3853c15e6480ada6" title="Set length of vector. if copy = true then keeping the old values.">set_size</a>(order, <span class="keyword">false</span>); |
---|
360 | <a name="l00415"></a>00415 } |
---|
361 | <a name="l00416"></a>00416 |
---|
362 | <a name="l00417"></a>00417 <span class="comment">//------------------- Sequence Interleaver --------------------------------</span> |
---|
363 | <a name="l00418"></a>00418 |
---|
364 | <a name="l00419"></a>00419 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
365 | <a name="l00420"></a><a class="code" href="classitpp_1_1Sequence__Interleaver.html#219bd8d01d532d0c914c93727fce8cd1">00420</a> <a class="code" href="classitpp_1_1Sequence__Interleaver.html#5a2944c1c1dc62bb6c948e56b4785a0c" title="Sequence_Interleaver constructor.">Sequence_Interleaver<T>::Sequence_Interleaver</a>(<span class="keywordtype">int</span> in_interleaver_depth) |
---|
366 | <a name="l00421"></a>00421 { |
---|
367 | <a name="l00422"></a>00422 interleaver_depth = in_interleaver_depth; |
---|
368 | <a name="l00423"></a>00423 interleaver_sequence = sort_index(<a class="code" href="group__randgen.html#g7468ff48604f0bcc7e08b08f3d27d2fa" title="Generates a random uniform (0,1) matrix.">randu</a>(in_interleaver_depth)); |
---|
369 | <a name="l00424"></a>00424 input_length = 0; |
---|
370 | <a name="l00425"></a>00425 } |
---|
371 | <a name="l00426"></a>00426 |
---|
372 | <a name="l00427"></a>00427 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
373 | <a name="l00428"></a><a class="code" href="classitpp_1_1Sequence__Interleaver.html#41bd70b8751ff4f827e08ad43a9f082d">00428</a> <a class="code" href="classitpp_1_1Sequence__Interleaver.html#5a2944c1c1dc62bb6c948e56b4785a0c" title="Sequence_Interleaver constructor.">Sequence_Interleaver<T>::Sequence_Interleaver</a>(ivec in_interleaver_sequence) |
---|
374 | <a name="l00429"></a>00429 { |
---|
375 | <a name="l00430"></a>00430 interleaver_depth = in_interleaver_sequence.length(); |
---|
376 | <a name="l00431"></a>00431 interleaver_sequence = in_interleaver_sequence; |
---|
377 | <a name="l00432"></a>00432 input_length = 0; |
---|
378 | <a name="l00433"></a>00433 } |
---|
379 | <a name="l00434"></a>00434 |
---|
380 | <a name="l00435"></a>00435 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
381 | <a name="l00436"></a><a class="code" href="classitpp_1_1Sequence__Interleaver.html#e9ac67d98ff2a698fd47937a09d0ff11">00436</a> <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Sequence__Interleaver.html#3436faf70c53400695f0c54ee9c0fb64" title="Function for sequence interleaving. May add some zeros.">Sequence_Interleaver<T>::interleave</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &input, <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &output) |
---|
382 | <a name="l00437"></a>00437 { |
---|
383 | <a name="l00438"></a>00438 input_length = input.<a class="code" href="classitpp_1_1Vec.html#44478ea086eda22a180102e77e352325" title="The size of the vector.">length</a>(); |
---|
384 | <a name="l00439"></a>00439 <span class="keywordtype">int</span> steps = (int)<a class="code" href="group__convertfunc.html#g0cb0ca1ce1f1218522ba2b1e0e1fe5a5" title="Round to nearest upper integer.">std::ceil</a>(<span class="keywordtype">double</span>(input_length) / double(interleaver_depth)); |
---|
385 | <a name="l00440"></a>00440 <span class="keywordtype">int</span> output_length = steps * interleaver_depth; |
---|
386 | <a name="l00441"></a>00441 output.<a class="code" href="classitpp_1_1Vec.html#a4b02b7819e540bb3853c15e6480ada6" title="Set length of vector. if copy = true then keeping the old values.">set_size</a>(output_length, <span class="keyword">false</span>); |
---|
387 | <a name="l00442"></a>00442 <span class="keywordtype">int</span> s, i; |
---|
388 | <a name="l00443"></a>00443 |
---|
389 | <a name="l00444"></a>00444 <span class="keywordflow">if</span> (input_length == output_length) { |
---|
390 | <a name="l00445"></a>00445 |
---|
391 | <a name="l00446"></a>00446 <span class="comment">//Sequence interleaver loop: All steps.</span> |
---|
392 | <a name="l00447"></a>00447 <span class="keywordflow">for</span> (s = 0; s < steps; s++) { |
---|
393 | <a name="l00448"></a>00448 <span class="keywordflow">for</span> (i = 0; i < interleaver_depth; i++) { |
---|
394 | <a name="l00449"></a>00449 output(s*interleaver_depth + i) = input(s * interleaver_depth + interleaver_sequence(i)); |
---|
395 | <a name="l00450"></a>00450 } |
---|
396 | <a name="l00451"></a>00451 } |
---|
397 | <a name="l00452"></a>00452 |
---|
398 | <a name="l00453"></a>00453 } |
---|
399 | <a name="l00454"></a>00454 <span class="keywordflow">else</span> { |
---|
400 | <a name="l00455"></a>00455 |
---|
401 | <a name="l00456"></a>00456 <span class="comment">//Sequence interleaver loop: All, but the last, steps.</span> |
---|
402 | <a name="l00457"></a>00457 <span class="keywordflow">for</span> (s = 0; s < steps - 1; s++) { |
---|
403 | <a name="l00458"></a>00458 <span class="keywordflow">for</span> (i = 0; i < interleaver_depth; i++) { |
---|
404 | <a name="l00459"></a>00459 output(s*interleaver_depth + i) = input(s * interleaver_depth + interleaver_sequence(i)); |
---|
405 | <a name="l00460"></a>00460 } |
---|
406 | <a name="l00461"></a>00461 } |
---|
407 | <a name="l00462"></a>00462 <span class="comment">//The last step.</span> |
---|
408 | <a name="l00463"></a>00463 <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> zerovect(output_length - input_length); |
---|
409 | <a name="l00464"></a>00464 zerovect.<a class="code" href="classitpp_1_1Vec.html#6f2f64c04ed8adb0d9be53e0266d875d" title="Set the vector to the all zero vector.">clear</a>(); |
---|
410 | <a name="l00465"></a>00465 <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> temp_last_input = concat(input.<a class="code" href="classitpp_1_1Vec.html#e134864ce9e73858efd329ab7183cace" title="Get the right nr elements from the vector.">right</a>(interleaver_depth - zerovect.<a class="code" href="classitpp_1_1Vec.html#44478ea086eda22a180102e77e352325" title="The size of the vector.">length</a>()), zerovect); |
---|
411 | <a name="l00466"></a>00466 <span class="keywordflow">for</span> (i = 0; i < interleaver_depth; i++) { |
---|
412 | <a name="l00467"></a>00467 output((steps - 1)*interleaver_depth + i) = temp_last_input(interleaver_sequence(i)); |
---|
413 | <a name="l00468"></a>00468 } |
---|
414 | <a name="l00469"></a>00469 |
---|
415 | <a name="l00470"></a>00470 } |
---|
416 | <a name="l00471"></a>00471 } |
---|
417 | <a name="l00472"></a>00472 |
---|
418 | <a name="l00473"></a>00473 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
419 | <a name="l00474"></a><a class="code" href="classitpp_1_1Sequence__Interleaver.html#3436faf70c53400695f0c54ee9c0fb64">00474</a> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> <a class="code" href="classitpp_1_1Sequence__Interleaver.html#3436faf70c53400695f0c54ee9c0fb64" title="Function for sequence interleaving. May add some zeros.">Sequence_Interleaver<T>::interleave</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &input) |
---|
420 | <a name="l00475"></a>00475 { |
---|
421 | <a name="l00476"></a>00476 <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> output; |
---|
422 | <a name="l00477"></a>00477 <a class="code" href="classitpp_1_1Sequence__Interleaver.html#3436faf70c53400695f0c54ee9c0fb64" title="Function for sequence interleaving. May add some zeros.">interleave</a>(input, output); |
---|
423 | <a name="l00478"></a>00478 <span class="keywordflow">return</span> output; |
---|
424 | <a name="l00479"></a>00479 } |
---|
425 | <a name="l00480"></a>00480 |
---|
426 | <a name="l00481"></a>00481 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
427 | <a name="l00482"></a><a class="code" href="classitpp_1_1Sequence__Interleaver.html#9782d94ff1322dfca4db14b62724e6d9">00482</a> <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Sequence__Interleaver.html#8394055c94d125c12995bf418dc356c0" title="Function for sequence deinterleaving. Removes additional zeros if keepzeros = 0.">Sequence_Interleaver<T>::deinterleave</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &input, <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &output, <span class="keywordtype">short</span> keepzeros) |
---|
428 | <a name="l00483"></a>00483 { |
---|
429 | <a name="l00484"></a>00484 <span class="keywordtype">int</span> thisinput_length = input.<a class="code" href="classitpp_1_1Vec.html#44478ea086eda22a180102e77e352325" title="The size of the vector.">length</a>(); |
---|
430 | <a name="l00485"></a>00485 <span class="keywordtype">int</span> steps = (int)<a class="code" href="group__convertfunc.html#g0cb0ca1ce1f1218522ba2b1e0e1fe5a5" title="Round to nearest upper integer.">std::ceil</a>(<span class="keywordtype">double</span>(thisinput_length) / double(interleaver_depth)); |
---|
431 | <a name="l00486"></a>00486 <span class="keywordtype">int</span> output_length = steps * interleaver_depth; |
---|
432 | <a name="l00487"></a>00487 output.<a class="code" href="classitpp_1_1Vec.html#d56d0d3d9f354d2401638c273f8ae200" title="Set length of vector. if copy = true then keeping the old values.">set_length</a>(output_length, <span class="keyword">false</span>); |
---|
433 | <a name="l00488"></a>00488 <span class="keywordtype">int</span> s, i; |
---|
434 | <a name="l00489"></a>00489 |
---|
435 | <a name="l00490"></a>00490 <span class="keywordflow">if</span> (thisinput_length == output_length) { |
---|
436 | <a name="l00491"></a>00491 |
---|
437 | <a name="l00492"></a>00492 <span class="comment">//Sequence interleaver loop: All steps.</span> |
---|
438 | <a name="l00493"></a>00493 <span class="keywordflow">for</span> (s = 0; s < steps; s++) { |
---|
439 | <a name="l00494"></a>00494 <span class="keywordflow">for</span> (i = 0; i < interleaver_depth; i++) { |
---|
440 | <a name="l00495"></a>00495 output(s*interleaver_depth + interleaver_sequence(i)) = input(s * interleaver_depth + i); |
---|
441 | <a name="l00496"></a>00496 } |
---|
442 | <a name="l00497"></a>00497 } |
---|
443 | <a name="l00498"></a>00498 |
---|
444 | <a name="l00499"></a>00499 } |
---|
445 | <a name="l00500"></a>00500 <span class="keywordflow">else</span> { |
---|
446 | <a name="l00501"></a>00501 <span class="comment">//Sequence interleaver loop: All, but the last, steps.</span> |
---|
447 | <a name="l00502"></a>00502 <span class="keywordflow">for</span> (s = 0; s < steps - 1; s++) { |
---|
448 | <a name="l00503"></a>00503 <span class="keywordflow">for</span> (i = 0; i < interleaver_depth; i++) { |
---|
449 | <a name="l00504"></a>00504 output(s*interleaver_depth + interleaver_sequence(i)) = input(s * interleaver_depth + i); |
---|
450 | <a name="l00505"></a>00505 } |
---|
451 | <a name="l00506"></a>00506 } |
---|
452 | <a name="l00507"></a>00507 <span class="comment">//The last step.</span> |
---|
453 | <a name="l00508"></a>00508 <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> zerovect(output_length - thisinput_length); |
---|
454 | <a name="l00509"></a>00509 zerovect.<a class="code" href="classitpp_1_1Vec.html#6f2f64c04ed8adb0d9be53e0266d875d" title="Set the vector to the all zero vector.">clear</a>(); |
---|
455 | <a name="l00510"></a>00510 <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> temp_last_input = concat(input.<a class="code" href="classitpp_1_1Vec.html#e134864ce9e73858efd329ab7183cace" title="Get the right nr elements from the vector.">right</a>(interleaver_depth - zerovect.<a class="code" href="classitpp_1_1Vec.html#44478ea086eda22a180102e77e352325" title="The size of the vector.">length</a>()), zerovect); |
---|
456 | <a name="l00511"></a>00511 <span class="keywordflow">for</span> (i = 0; i < interleaver_depth; i++) { |
---|
457 | <a name="l00512"></a>00512 output((steps - 1)*interleaver_depth + interleaver_sequence(i)) = temp_last_input(i); |
---|
458 | <a name="l00513"></a>00513 } |
---|
459 | <a name="l00514"></a>00514 <span class="keywordflow">if</span> (keepzeros == 0) |
---|
460 | <a name="l00515"></a>00515 output.<a class="code" href="classitpp_1_1Vec.html#a4b02b7819e540bb3853c15e6480ada6" title="Set length of vector. if copy = true then keeping the old values.">set_size</a>(input_length, <span class="keyword">true</span>); |
---|
461 | <a name="l00516"></a>00516 } |
---|
462 | <a name="l00517"></a>00517 |
---|
463 | <a name="l00518"></a>00518 } |
---|
464 | <a name="l00519"></a>00519 |
---|
465 | <a name="l00520"></a>00520 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
466 | <a name="l00521"></a><a class="code" href="classitpp_1_1Sequence__Interleaver.html#8394055c94d125c12995bf418dc356c0">00521</a> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> <a class="code" href="classitpp_1_1Sequence__Interleaver.html#8394055c94d125c12995bf418dc356c0" title="Function for sequence deinterleaving. Removes additional zeros if keepzeros = 0.">Sequence_Interleaver<T>::deinterleave</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &input, <span class="keywordtype">short</span> keepzeros) |
---|
467 | <a name="l00522"></a>00522 { |
---|
468 | <a name="l00523"></a>00523 <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> output; |
---|
469 | <a name="l00524"></a>00524 <a class="code" href="classitpp_1_1Sequence__Interleaver.html#8394055c94d125c12995bf418dc356c0" title="Function for sequence deinterleaving. Removes additional zeros if keepzeros = 0.">deinterleave</a>(input, output, keepzeros); |
---|
470 | <a name="l00525"></a>00525 <span class="keywordflow">return</span> output; |
---|
471 | <a name="l00526"></a>00526 } |
---|
472 | <a name="l00527"></a>00527 |
---|
473 | <a name="l00528"></a>00528 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
474 | <a name="l00529"></a><a class="code" href="classitpp_1_1Sequence__Interleaver.html#f68f9acbac21192d93de9284db930340">00529</a> <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Sequence__Interleaver.html#f68f9acbac21192d93de9284db930340" title="Generate a new random sequence for interleaving.">Sequence_Interleaver<T>::randomize_interleaver_sequence</a>() |
---|
475 | <a name="l00530"></a>00530 { |
---|
476 | <a name="l00531"></a>00531 interleaver_sequence = sort_index(<a class="code" href="group__randgen.html#g7468ff48604f0bcc7e08b08f3d27d2fa" title="Generates a random uniform (0,1) matrix.">randu</a>(interleaver_depth)); |
---|
477 | <a name="l00532"></a>00532 } |
---|
478 | <a name="l00533"></a>00533 |
---|
479 | <a name="l00534"></a>00534 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
480 | <a name="l00535"></a><a class="code" href="classitpp_1_1Sequence__Interleaver.html#ccff537b7dd07bbc1d34ec343e7df63a">00535</a> ivec <a class="code" href="classitpp_1_1Sequence__Interleaver.html#ccff537b7dd07bbc1d34ec343e7df63a" title="Returns the interleaver sequence presently used.">Sequence_Interleaver<T>::get_interleaver_sequence</a>() |
---|
481 | <a name="l00536"></a>00536 { |
---|
482 | <a name="l00537"></a>00537 <span class="keywordflow">return</span> interleaver_sequence; |
---|
483 | <a name="l00538"></a>00538 } |
---|
484 | <a name="l00539"></a>00539 |
---|
485 | <a name="l00540"></a>00540 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
486 | <a name="l00541"></a><a class="code" href="classitpp_1_1Sequence__Interleaver.html#db47d1227f4a2b47a2a2aff225ca5bf5">00541</a> <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Sequence__Interleaver.html#db47d1227f4a2b47a2a2aff225ca5bf5" title="Set the interleaver sequence to be used.">Sequence_Interleaver<T>::set_interleaver_sequence</a>(ivec in_interleaver_sequence) |
---|
487 | <a name="l00542"></a>00542 { |
---|
488 | <a name="l00543"></a>00543 interleaver_sequence = in_interleaver_sequence; |
---|
489 | <a name="l00544"></a>00544 interleaver_depth = interleaver_sequence.size(); |
---|
490 | <a name="l00545"></a>00545 } |
---|
491 | <a name="l00546"></a>00546 |
---|
492 | <a name="l00548"></a>00548 |
---|
493 | <a name="l00549"></a>00549 <span class="comment">// ----------------------------------------------------------------------</span> |
---|
494 | <a name="l00550"></a>00550 <span class="comment">// Instantiations</span> |
---|
495 | <a name="l00551"></a>00551 <span class="comment">// ----------------------------------------------------------------------</span> |
---|
496 | <a name="l00552"></a>00552 |
---|
497 | <a name="l00553"></a>00553 <span class="preprocessor">#ifdef HAVE_EXTERN_TEMPLATE</span> |
---|
498 | <a name="l00554"></a>00554 <span class="preprocessor"></span> |
---|
499 | <a name="l00555"></a>00555 <span class="keyword">extern</span> <span class="keyword">template</span> <span class="keyword">class </span><a class="code" href="classitpp_1_1Block__Interleaver.html" title="Block Interleaver Class.">Block_Interleaver<double></a>; |
---|
500 | <a name="l00556"></a>00556 <span class="keyword">extern</span> <span class="keyword">template</span> <span class="keyword">class </span><a class="code" href="classitpp_1_1Block__Interleaver.html" title="Block Interleaver Class.">Block_Interleaver<short></a>; |
---|
501 | <a name="l00557"></a>00557 <span class="keyword">extern</span> <span class="keyword">template</span> <span class="keyword">class </span><a class="code" href="classitpp_1_1Block__Interleaver.html" title="Block Interleaver Class.">Block_Interleaver<int></a>; |
---|
502 | <a name="l00558"></a>00558 <span class="keyword">extern</span> <span class="keyword">template</span> <span class="keyword">class </span><a class="code" href="classitpp_1_1Block__Interleaver.html" title="Block Interleaver Class.">Block_Interleaver<std::complex<double></a> >; |
---|
503 | <a name="l00559"></a>00559 <span class="keyword">extern</span> <span class="keyword">template</span> <span class="keyword">class </span><a class="code" href="classitpp_1_1Block__Interleaver.html" title="Block Interleaver Class.">Block_Interleaver<bin></a>; |
---|
504 | <a name="l00560"></a>00560 |
---|
505 | <a name="l00561"></a>00561 <span class="keyword">extern</span> <span class="keyword">template</span> <span class="keyword">class </span><a class="code" href="classitpp_1_1Cross__Interleaver.html" title="Cross Interleaver Class.">Cross_Interleaver<double></a>; |
---|
506 | <a name="l00562"></a>00562 <span class="keyword">extern</span> <span class="keyword">template</span> <span class="keyword">class </span><a class="code" href="classitpp_1_1Cross__Interleaver.html" title="Cross Interleaver Class.">Cross_Interleaver<short></a>; |
---|
507 | <a name="l00563"></a>00563 <span class="keyword">extern</span> <span class="keyword">template</span> <span class="keyword">class </span><a class="code" href="classitpp_1_1Cross__Interleaver.html" title="Cross Interleaver Class.">Cross_Interleaver<int></a>; |
---|
508 | <a name="l00564"></a>00564 <span class="keyword">extern</span> <span class="keyword">template</span> <span class="keyword">class </span><a class="code" href="classitpp_1_1Cross__Interleaver.html" title="Cross Interleaver Class.">Cross_Interleaver<std::complex<double></a> >; |
---|
509 | <a name="l00565"></a>00565 <span class="keyword">extern</span> <span class="keyword">template</span> <span class="keyword">class </span><a class="code" href="classitpp_1_1Cross__Interleaver.html" title="Cross Interleaver Class.">Cross_Interleaver<bin></a>; |
---|
510 | <a name="l00566"></a>00566 |
---|
511 | <a name="l00567"></a>00567 <span class="keyword">extern</span> <span class="keyword">template</span> <span class="keyword">class </span><a class="code" href="classitpp_1_1Sequence__Interleaver.html">Sequence_Interleaver<double></a>; |
---|
512 | <a name="l00568"></a>00568 <span class="keyword">extern</span> <span class="keyword">template</span> <span class="keyword">class </span><a class="code" href="classitpp_1_1Sequence__Interleaver.html" title="Sequence Interleaver Class.">Sequence_Interleaver<short></a>; |
---|
513 | <a name="l00569"></a>00569 <span class="keyword">extern</span> <span class="keyword">template</span> <span class="keyword">class </span><a class="code" href="classitpp_1_1Sequence__Interleaver.html" title="Sequence Interleaver Class.">Sequence_Interleaver<int></a>; |
---|
514 | <a name="l00570"></a>00570 <span class="keyword">extern</span> <span class="keyword">template</span> <span class="keyword">class </span><a class="code" href="classitpp_1_1Sequence__Interleaver.html" title="Sequence Interleaver Class.">Sequence_Interleaver<std::complex<double></a> >; |
---|
515 | <a name="l00571"></a>00571 <span class="keyword">extern</span> <span class="keyword">template</span> <span class="keyword">class </span><a class="code" href="classitpp_1_1Sequence__Interleaver.html">Sequence_Interleaver<bin></a>; |
---|
516 | <a name="l00572"></a>00572 |
---|
517 | <a name="l00573"></a>00573 <span class="preprocessor">#endif // HAVE_EXTERN_TEMPLATE</span> |
---|
518 | <a name="l00574"></a>00574 <span class="preprocessor"></span> |
---|
519 | <a name="l00576"></a>00576 |
---|
520 | <a name="l00577"></a>00577 } <span class="comment">// namespace itpp</span> |
---|
521 | <a name="l00578"></a>00578 |
---|
522 | <a name="l00579"></a>00579 <span class="preprocessor">#endif // #ifndef INTERLEAVE_H</span> |
---|
523 | </pre></div></div> |
---|
524 | <hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:02:11 2009 for mixpp by |
---|
525 | <a href="http://www.doxygen.org/index.html"> |
---|
526 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> |
---|
527 | </body> |
---|
528 | </html> |
---|