[353] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
---|
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
---|
| 3 | <title>mixpp: resampling.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>resampling.h</h1><a href="resampling_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 RESAMPLING_H</span> |
---|
| 67 | <a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define RESAMPLING_H</span> |
---|
| 68 | <a name="l00031"></a>00031 <span class="preprocessor"></span> |
---|
| 69 | <a name="l00032"></a>00032 <span class="preprocessor">#include <<a class="code" href="mat_8h.html" title="Matrix Class Definitions.">itpp/base/mat.h</a>></span> |
---|
| 70 | <a name="l00033"></a>00033 |
---|
| 71 | <a name="l00034"></a>00034 |
---|
| 72 | <a name="l00035"></a>00035 <span class="keyword">namespace </span>itpp |
---|
| 73 | <a name="l00036"></a>00036 { |
---|
| 74 | <a name="l00037"></a>00037 |
---|
| 75 | <a name="l00043"></a>00043 |
---|
| 76 | <a name="l00044"></a>00044 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
| 77 | <a name="l00045"></a><a class="code" href="group__resampling.html#g2a106693933d6a64e19d49788fe859c0">00045</a> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> <a class="code" href="group__resampling.html#g9ff080d07845bcd2856aa13eff71b066" title="Repeats each column norepeats times in sequence.">repeat</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &v, <span class="keywordtype">int</span> norepeats) |
---|
| 78 | <a name="l00046"></a>00046 { |
---|
| 79 | <a name="l00047"></a>00047 <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> temp(v.<a class="code" href="classitpp_1_1Vec.html#44478ea086eda22a180102e77e352325" title="The size of the vector.">length</a>()*norepeats); |
---|
| 80 | <a name="l00048"></a>00048 |
---|
| 81 | <a name="l00049"></a>00049 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < v.<a class="code" href="classitpp_1_1Vec.html#44478ea086eda22a180102e77e352325" title="The size of the vector.">length</a>(); i++) { |
---|
| 82 | <a name="l00050"></a>00050 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0;j < norepeats;j++) |
---|
| 83 | <a name="l00051"></a>00051 temp(i*norepeats + j) = v(i); |
---|
| 84 | <a name="l00052"></a>00052 } |
---|
| 85 | <a name="l00053"></a>00053 <span class="keywordflow">return</span> temp; |
---|
| 86 | <a name="l00054"></a>00054 } |
---|
| 87 | <a name="l00055"></a>00055 |
---|
| 88 | <a name="l00057"></a>00057 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
| 89 | <a name="l00058"></a><a class="code" href="group__resampling.html#g9ff080d07845bcd2856aa13eff71b066">00058</a> <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> <a class="code" href="group__resampling.html#g9ff080d07845bcd2856aa13eff71b066" title="Repeats each column norepeats times in sequence.">repeat</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> &m, <span class="keywordtype">int</span> norepeats) |
---|
| 90 | <a name="l00059"></a>00059 { |
---|
| 91 | <a name="l00060"></a>00060 <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> temp(m.<a class="code" href="classitpp_1_1Mat.html#f3028609c01e08fb07c5bf0bcd4c4e03" title="The number of rows.">rows</a>(), m.<a class="code" href="classitpp_1_1Mat.html#49680ef454d1d75b737e3ce157f1ac7b" title="The number of columns.">cols</a>()*norepeats); |
---|
| 92 | <a name="l00061"></a>00061 |
---|
| 93 | <a name="l00062"></a>00062 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j < m.<a class="code" href="classitpp_1_1Mat.html#49680ef454d1d75b737e3ce157f1ac7b" title="The number of columns.">cols</a>(); j++) { |
---|
| 94 | <a name="l00063"></a>00063 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0;i < norepeats;i++) { |
---|
| 95 | <a name="l00064"></a>00064 temp.<a class="code" href="classitpp_1_1Mat.html#4fb84a9b5cef1a6dc31bd7d5317bb077" title="Set column c to vector v.">set_col</a>(j*norepeats + i, m.<a class="code" href="classitpp_1_1Mat.html#095a4e54f39932b62633f7f4f252ab46" title="Get column c.">get_col</a>(j)); |
---|
| 96 | <a name="l00065"></a>00065 } |
---|
| 97 | <a name="l00066"></a>00066 } |
---|
| 98 | <a name="l00067"></a>00067 <span class="keywordflow">return</span> temp; |
---|
| 99 | <a name="l00068"></a>00068 } |
---|
| 100 | <a name="l00069"></a>00069 |
---|
| 101 | <a name="l00071"></a>00071 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
| 102 | <a name="l00072"></a><a class="code" href="group__resampling.html#g409569431add128d605854bb0d70ac00">00072</a> <span class="keywordtype">void</span> <a class="code" href="group__resampling.html#g3d871a62ec6d1cebc121b191eefaefdd" title="Upsample each column by inserting (usf-1) zeros after each column.">upsample</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &v, <span class="keywordtype">int</span> usf, <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &u) |
---|
| 103 | <a name="l00073"></a>00073 { |
---|
| 104 | <a name="l00074"></a>00074 <a class="code" href="group__errorhandlingfunc.html#gb319550e696ee9d824d23c2a176bc3a6" title="Abort if t is not true and NDEBUG is not defined.">it_assert_debug</a>(usf >= 1, <span class="stringliteral">"upsample: upsampling factor must be equal or greater than one"</span>); |
---|
| 105 | <a name="l00075"></a>00075 u.<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>(v.<a class="code" href="classitpp_1_1Vec.html#44478ea086eda22a180102e77e352325" title="The size of the vector.">length</a>()*usf); |
---|
| 106 | <a name="l00076"></a>00076 u.<a class="code" href="classitpp_1_1Vec.html#6f2f64c04ed8adb0d9be53e0266d875d" title="Set the vector to the all zero vector.">clear</a>(); |
---|
| 107 | <a name="l00077"></a>00077 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0;i < v.<a class="code" href="classitpp_1_1Vec.html#44478ea086eda22a180102e77e352325" title="The size of the vector.">length</a>();i++) |
---|
| 108 | <a name="l00078"></a>00078 u(i*usf) = v(i); |
---|
| 109 | <a name="l00079"></a>00079 } |
---|
| 110 | <a name="l00080"></a>00080 |
---|
| 111 | <a name="l00081"></a>00081 |
---|
| 112 | <a name="l00083"></a>00083 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
| 113 | <a name="l00084"></a><a class="code" href="group__resampling.html#g545014c4dbe883f23d16ce38ffeeb50b">00084</a> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> <a class="code" href="group__resampling.html#g3d871a62ec6d1cebc121b191eefaefdd" title="Upsample each column by inserting (usf-1) zeros after each column.">upsample</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &v, <span class="keywordtype">int</span> usf) |
---|
| 114 | <a name="l00085"></a>00085 { |
---|
| 115 | <a name="l00086"></a>00086 <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> u; |
---|
| 116 | <a name="l00087"></a>00087 <a class="code" href="group__resampling.html#g3d871a62ec6d1cebc121b191eefaefdd" title="Upsample each column by inserting (usf-1) zeros after each column.">upsample</a>(v, usf, u); |
---|
| 117 | <a name="l00088"></a>00088 <span class="keywordflow">return</span> u; |
---|
| 118 | <a name="l00089"></a>00089 } |
---|
| 119 | <a name="l00090"></a>00090 |
---|
| 120 | <a name="l00092"></a>00092 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
| 121 | <a name="l00093"></a><a class="code" href="group__resampling.html#gc2b6aa536f2c5b6996d01bb22f8b7ccb">00093</a> <span class="keywordtype">void</span> <a class="code" href="group__resampling.html#g3d871a62ec6d1cebc121b191eefaefdd" title="Upsample each column by inserting (usf-1) zeros after each column.">upsample</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> &v, <span class="keywordtype">int</span> usf, <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> &u) |
---|
| 122 | <a name="l00094"></a>00094 { |
---|
| 123 | <a name="l00095"></a>00095 <a class="code" href="group__errorhandlingfunc.html#gb319550e696ee9d824d23c2a176bc3a6" title="Abort if t is not true and NDEBUG is not defined.">it_assert_debug</a>(usf >= 1, <span class="stringliteral">"upsample: upsampling factor must be equal or greater than one"</span>); |
---|
| 124 | <a name="l00096"></a>00096 u.<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>(v.<a class="code" href="classitpp_1_1Mat.html#f3028609c01e08fb07c5bf0bcd4c4e03" title="The number of rows.">rows</a>(), v.<a class="code" href="classitpp_1_1Mat.html#49680ef454d1d75b737e3ce157f1ac7b" title="The number of columns.">cols</a>()*usf); |
---|
| 125 | <a name="l00097"></a>00097 u.<a class="code" href="classitpp_1_1Mat.html#1682c299a3a2a65fef1764136ea8f344" title="Set matrix equal to the all zero matrix.">clear</a>(); |
---|
| 126 | <a name="l00098"></a>00098 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0;j < v.<a class="code" href="classitpp_1_1Mat.html#49680ef454d1d75b737e3ce157f1ac7b" title="The number of columns.">cols</a>();j++) |
---|
| 127 | <a name="l00099"></a>00099 u.<a class="code" href="classitpp_1_1Mat.html#4fb84a9b5cef1a6dc31bd7d5317bb077" title="Set column c to vector v.">set_col</a>(j*usf, v.<a class="code" href="classitpp_1_1Mat.html#095a4e54f39932b62633f7f4f252ab46" title="Get column c.">get_col</a>(j)); |
---|
| 128 | <a name="l00100"></a>00100 } |
---|
| 129 | <a name="l00101"></a>00101 |
---|
| 130 | <a name="l00103"></a>00103 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
| 131 | <a name="l00104"></a><a class="code" href="group__resampling.html#g3d871a62ec6d1cebc121b191eefaefdd">00104</a> <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> <a class="code" href="group__resampling.html#g3d871a62ec6d1cebc121b191eefaefdd" title="Upsample each column by inserting (usf-1) zeros after each column.">upsample</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> &v, <span class="keywordtype">int</span> usf) |
---|
| 132 | <a name="l00105"></a>00105 { |
---|
| 133 | <a name="l00106"></a>00106 <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> u; |
---|
| 134 | <a name="l00107"></a>00107 <a class="code" href="group__resampling.html#g3d871a62ec6d1cebc121b191eefaefdd" title="Upsample each column by inserting (usf-1) zeros after each column.">upsample</a>(v, usf, u); |
---|
| 135 | <a name="l00108"></a>00108 <span class="keywordflow">return</span> u; |
---|
| 136 | <a name="l00109"></a>00109 } |
---|
| 137 | <a name="l00110"></a>00110 |
---|
| 138 | <a name="l00112"></a>00112 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
| 139 | <a name="l00113"></a><a class="code" href="group__resampling.html#g1edce5495e12ba4bf56c55eafceb3ccf">00113</a> <span class="keywordtype">void</span> <a class="code" href="group__resampling.html#gc93cd1b7a5f6c6def70930bb63035f01" title="Upsample vector v to achieve f_ups frequency using linear interpolation.">lininterp</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> &m, <span class="keywordtype">int</span> usf, <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> &u) |
---|
| 140 | <a name="l00114"></a>00114 { |
---|
| 141 | <a name="l00115"></a>00115 <a class="code" href="group__errorhandlingfunc.html#gb319550e696ee9d824d23c2a176bc3a6" title="Abort if t is not true and NDEBUG is not defined.">it_assert_debug</a>(usf >= 1, <span class="stringliteral">"lininterp: upsampling factor must be equal or greater than one"</span>); |
---|
| 142 | <a name="l00116"></a>00116 <span class="keywordtype">int</span> L = (m.<a class="code" href="classitpp_1_1Mat.html#49680ef454d1d75b737e3ce157f1ac7b" title="The number of columns.">cols</a>() - 1) * usf + 1; |
---|
| 143 | <a name="l00117"></a>00117 u.<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>(m.<a class="code" href="classitpp_1_1Mat.html#f3028609c01e08fb07c5bf0bcd4c4e03" title="The number of rows.">rows</a>(), L); |
---|
| 144 | <a name="l00118"></a>00118 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < m.<a class="code" href="classitpp_1_1Mat.html#f3028609c01e08fb07c5bf0bcd4c4e03" title="The number of rows.">rows</a>(); i++) { |
---|
| 145 | <a name="l00119"></a>00119 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j < L - 1; j++) |
---|
| 146 | <a name="l00120"></a>00120 u(i, j) = (m(i, j / usf) + (j % usf) / ((<span class="keywordtype">double</span>)usf) * (m(i, (j + usf) / usf) - m(i, j / usf))); |
---|
| 147 | <a name="l00121"></a>00121 u(i, L - 1) = m(i, m.<a class="code" href="classitpp_1_1Mat.html#49680ef454d1d75b737e3ce157f1ac7b" title="The number of columns.">cols</a>() - 1); |
---|
| 148 | <a name="l00122"></a>00122 } |
---|
| 149 | <a name="l00123"></a>00123 } |
---|
| 150 | <a name="l00124"></a>00124 |
---|
| 151 | <a name="l00135"></a>00135 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
| 152 | <a name="l00136"></a><a class="code" href="group__resampling.html#ga10c80518f9c703ac2fd0e17d109d507">00136</a> <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> <a class="code" href="group__resampling.html#gc93cd1b7a5f6c6def70930bb63035f01" title="Upsample vector v to achieve f_ups frequency using linear interpolation.">lininterp</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> &m, <span class="keywordtype">double</span> f_base, <span class="keywordtype">double</span> f_ups, |
---|
| 153 | <a name="l00137"></a>00137 <span class="keywordtype">int</span> nrof_samples, <span class="keywordtype">double</span> t_start = 0) |
---|
| 154 | <a name="l00138"></a>00138 { |
---|
| 155 | <a name="l00139"></a>00139 <span class="keywordtype">double</span> t_base = 1 / f_base; |
---|
| 156 | <a name="l00140"></a>00140 <span class="keywordtype">double</span> t_ups = 1 / f_ups; |
---|
| 157 | <a name="l00141"></a>00141 <span class="keywordtype">int</span> rows = m.<a class="code" href="classitpp_1_1Mat.html#f3028609c01e08fb07c5bf0bcd4c4e03" title="The number of rows.">rows</a>(); |
---|
| 158 | <a name="l00142"></a>00142 <span class="keywordtype">int</span> cols = m.<a class="code" href="classitpp_1_1Mat.html#49680ef454d1d75b737e3ce157f1ac7b" title="The number of columns.">cols</a>(); |
---|
| 159 | <a name="l00143"></a>00143 <a class="code" href="group__errorhandlingfunc.html#gb319550e696ee9d824d23c2a176bc3a6" title="Abort if t is not true and NDEBUG is not defined.">it_assert_debug</a>(f_ups > f_base, <span class="stringliteral">"lininterp(): upsampled frequency must be greater than base frequency"</span>); |
---|
| 160 | <a name="l00144"></a>00144 <a class="code" href="group__errorhandlingfunc.html#gb319550e696ee9d824d23c2a176bc3a6" title="Abort if t is not true and NDEBUG is not defined.">it_assert_debug</a>((t_start >= 0) && (t_start < cols * t_base), <span class="stringliteral">"lininterp(): incorrect start time offset"</span>); |
---|
| 161 | <a name="l00145"></a>00145 <a class="code" href="group__errorhandlingfunc.html#gb319550e696ee9d824d23c2a176bc3a6" title="Abort if t is not true and NDEBUG is not defined.">it_assert_debug</a>((nrof_samples * t_ups + t_start) <= (cols * t_base), <span class="stringliteral">"lininterp(): too many samples required or input data to short"</span>); |
---|
| 162 | <a name="l00146"></a>00146 <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> u(rows, nrof_samples); |
---|
| 163 | <a name="l00147"></a>00147 <span class="keywordtype">double</span> curr_time = t_start; |
---|
| 164 | <a name="l00148"></a>00148 |
---|
| 165 | <a name="l00149"></a>00149 <span class="keywordtype">int</span> i = 0; |
---|
| 166 | <a name="l00150"></a>00150 <span class="keywordtype">int</span> k = 0; |
---|
| 167 | <a name="l00151"></a>00151 <span class="keywordflow">while</span> (i < cols - 1) { |
---|
| 168 | <a name="l00152"></a>00152 <span class="keywordflow">while</span> ((curr_time < (i + 1) * t_base) && (k < nrof_samples)) { |
---|
| 169 | <a name="l00153"></a>00153 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j < rows; j++) { |
---|
| 170 | <a name="l00154"></a>00154 u(j, k) = (m(j, i) * ((i + 1) * t_base - curr_time) |
---|
| 171 | <a name="l00155"></a>00155 - m(j, i + 1) * (i * t_base - curr_time)) / t_base; |
---|
| 172 | <a name="l00156"></a>00156 } |
---|
| 173 | <a name="l00157"></a>00157 k++; |
---|
| 174 | <a name="l00158"></a>00158 curr_time += t_ups; |
---|
| 175 | <a name="l00159"></a>00159 } |
---|
| 176 | <a name="l00160"></a>00160 i++; |
---|
| 177 | <a name="l00161"></a>00161 } |
---|
| 178 | <a name="l00162"></a>00162 <span class="keywordflow">return</span> u; |
---|
| 179 | <a name="l00163"></a>00163 } |
---|
| 180 | <a name="l00164"></a>00164 |
---|
| 181 | <a name="l00166"></a>00166 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
| 182 | <a name="l00167"></a><a class="code" href="group__resampling.html#gc471270a0106fc66cecaa0d3463ef709">00167</a> <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> <a class="code" href="group__resampling.html#gc93cd1b7a5f6c6def70930bb63035f01" title="Upsample vector v to achieve f_ups frequency using linear interpolation.">lininterp</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> &m, <span class="keywordtype">int</span> usf) |
---|
| 183 | <a name="l00168"></a>00168 { |
---|
| 184 | <a name="l00169"></a>00169 <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> u; |
---|
| 185 | <a name="l00170"></a>00170 <a class="code" href="group__resampling.html#gc93cd1b7a5f6c6def70930bb63035f01" title="Upsample vector v to achieve f_ups frequency using linear interpolation.">lininterp</a>(m, usf, u); |
---|
| 186 | <a name="l00171"></a>00171 <span class="keywordflow">return</span> u; |
---|
| 187 | <a name="l00172"></a>00172 } |
---|
| 188 | <a name="l00173"></a>00173 |
---|
| 189 | <a name="l00175"></a>00175 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
| 190 | <a name="l00176"></a><a class="code" href="group__resampling.html#g4688220afd94dfd1e0c9ad3a170f6ad0">00176</a> <span class="keywordtype">void</span> <a class="code" href="group__resampling.html#gc93cd1b7a5f6c6def70930bb63035f01" title="Upsample vector v to achieve f_ups frequency using linear interpolation.">lininterp</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &v, <span class="keywordtype">int</span> usf, <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &u) |
---|
| 191 | <a name="l00177"></a>00177 { |
---|
| 192 | <a name="l00178"></a>00178 <a class="code" href="group__errorhandlingfunc.html#gb319550e696ee9d824d23c2a176bc3a6" title="Abort if t is not true and NDEBUG is not defined.">it_assert_debug</a>(usf >= 1, <span class="stringliteral">"lininterp(): upsampling factor must be equal or greater than one"</span>); |
---|
| 193 | <a name="l00179"></a>00179 <span class="keywordtype">int</span> L = (v.<a class="code" href="classitpp_1_1Vec.html#44478ea086eda22a180102e77e352325" title="The size of the vector.">length</a>() - 1) * usf + 1; |
---|
| 194 | <a name="l00180"></a>00180 u.<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>(L); |
---|
| 195 | <a name="l00181"></a>00181 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j < L - 1; j++) { |
---|
| 196 | <a name="l00182"></a>00182 u(j) = (v(j / usf) + (j % usf) / ((<span class="keywordtype">double</span>)usf) * (v((j + usf) / usf) - v(j / usf))); |
---|
| 197 | <a name="l00183"></a>00183 } |
---|
| 198 | <a name="l00184"></a>00184 u(L - 1) = v(v.<a class="code" href="classitpp_1_1Vec.html#44478ea086eda22a180102e77e352325" title="The size of the vector.">length</a>() - 1); |
---|
| 199 | <a name="l00185"></a>00185 } |
---|
| 200 | <a name="l00186"></a>00186 |
---|
| 201 | <a name="l00188"></a>00188 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
| 202 | <a name="l00189"></a><a class="code" href="group__resampling.html#g1419d1dc1df2d6a98286f46c06f37768">00189</a> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> <a class="code" href="group__resampling.html#gc93cd1b7a5f6c6def70930bb63035f01" title="Upsample vector v to achieve f_ups frequency using linear interpolation.">lininterp</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &v, <span class="keywordtype">int</span> usf) |
---|
| 203 | <a name="l00190"></a>00190 { |
---|
| 204 | <a name="l00191"></a>00191 <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> u; |
---|
| 205 | <a name="l00192"></a>00192 <a class="code" href="group__resampling.html#gc93cd1b7a5f6c6def70930bb63035f01" title="Upsample vector v to achieve f_ups frequency using linear interpolation.">lininterp</a>(v, usf, u); |
---|
| 206 | <a name="l00193"></a>00193 <span class="keywordflow">return</span> u; |
---|
| 207 | <a name="l00194"></a>00194 } |
---|
| 208 | <a name="l00195"></a>00195 |
---|
| 209 | <a name="l00206"></a>00206 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
| 210 | <a name="l00207"></a><a class="code" href="group__resampling.html#gc93cd1b7a5f6c6def70930bb63035f01">00207</a> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> <a class="code" href="group__resampling.html#gc93cd1b7a5f6c6def70930bb63035f01" title="Upsample vector v to achieve f_ups frequency using linear interpolation.">lininterp</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> &v, <span class="keywordtype">double</span> f_base, <span class="keywordtype">double</span> f_ups, |
---|
| 211 | <a name="l00208"></a>00208 <span class="keywordtype">int</span> nrof_samples, <span class="keywordtype">double</span> t_start = 0) |
---|
| 212 | <a name="l00209"></a>00209 { |
---|
| 213 | <a name="l00210"></a>00210 <span class="keywordtype">double</span> t_base = 1 / f_base; |
---|
| 214 | <a name="l00211"></a>00211 <span class="keywordtype">double</span> t_ups = 1 / f_ups; |
---|
| 215 | <a name="l00212"></a>00212 <span class="keywordtype">int</span> len = v.<a class="code" href="classitpp_1_1Vec.html#44478ea086eda22a180102e77e352325" title="The size of the vector.">length</a>(); |
---|
| 216 | <a name="l00213"></a>00213 <a class="code" href="group__errorhandlingfunc.html#gb319550e696ee9d824d23c2a176bc3a6" title="Abort if t is not true and NDEBUG is not defined.">it_assert_debug</a>(f_ups > f_base, <span class="stringliteral">"lininterp(): upsampled frequency must be greater than base frequency"</span>); |
---|
| 217 | <a name="l00214"></a>00214 <a class="code" href="group__errorhandlingfunc.html#gb319550e696ee9d824d23c2a176bc3a6" title="Abort if t is not true and NDEBUG is not defined.">it_assert_debug</a>((t_start >= 0) && (t_start < len * t_base), <span class="stringliteral">"lininterp(): incorrect start time offset"</span>); |
---|
| 218 | <a name="l00215"></a>00215 <a class="code" href="group__errorhandlingfunc.html#gb319550e696ee9d824d23c2a176bc3a6" title="Abort if t is not true and NDEBUG is not defined.">it_assert_debug</a>((nrof_samples * t_ups + t_start) <= (len * t_base), <span class="stringliteral">"lininterp(): too many samples required or input data to short"</span>); |
---|
| 219 | <a name="l00216"></a>00216 <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> u(nrof_samples); |
---|
| 220 | <a name="l00217"></a>00217 <span class="keywordtype">double</span> curr_time = t_start; |
---|
| 221 | <a name="l00218"></a>00218 |
---|
| 222 | <a name="l00219"></a>00219 <span class="keywordtype">int</span> i = 0; |
---|
| 223 | <a name="l00220"></a>00220 <span class="keywordtype">int</span> k = 0; |
---|
| 224 | <a name="l00221"></a>00221 <span class="keywordflow">while</span> (i < len - 1) { |
---|
| 225 | <a name="l00222"></a>00222 <span class="keywordflow">while</span> ((curr_time < (i + 1) * t_base) && (k < nrof_samples)) { |
---|
| 226 | <a name="l00223"></a>00223 u(k) = (v(i) * ((i + 1) * t_base - curr_time) |
---|
| 227 | <a name="l00224"></a>00224 - v(i + 1) * (i * t_base - curr_time)) / t_base; |
---|
| 228 | <a name="l00225"></a>00225 k++; |
---|
| 229 | <a name="l00226"></a>00226 curr_time += t_ups; |
---|
| 230 | <a name="l00227"></a>00227 } |
---|
| 231 | <a name="l00228"></a>00228 i++; |
---|
| 232 | <a name="l00229"></a>00229 } |
---|
| 233 | <a name="l00230"></a>00230 <span class="keywordflow">return</span> u; |
---|
| 234 | <a name="l00231"></a>00231 } |
---|
| 235 | <a name="l00232"></a>00232 |
---|
| 236 | <a name="l00237"></a>00237 <span class="preprocessor">#ifndef _MSC_VER</span> |
---|
| 237 | <a name="l00238"></a>00238 <span class="preprocessor"></span> |
---|
| 238 | <a name="l00239"></a>00239 <span class="comment">// ----------------------------------------------------------------------</span> |
---|
| 239 | <a name="l00240"></a>00240 <span class="comment">// Instantiations</span> |
---|
| 240 | <a name="l00241"></a>00241 <span class="comment">// ----------------------------------------------------------------------</span> |
---|
| 241 | <a name="l00242"></a>00242 |
---|
| 242 | <a name="l00244"></a>00244 <span class="keyword">extern</span> <span class="keyword">template</span> vec <a class="code" href="group__resampling.html#g9ff080d07845bcd2856aa13eff71b066" title="Repeats each column norepeats times in sequence.">repeat</a>(<span class="keyword">const</span> vec &v, <span class="keywordtype">int</span> norepeats); |
---|
| 243 | <a name="l00246"></a>00246 <span class="keyword">extern</span> <span class="keyword">template</span> cvec <a class="code" href="group__resampling.html#g9ff080d07845bcd2856aa13eff71b066" title="Repeats each column norepeats times in sequence.">repeat</a>(<span class="keyword">const</span> cvec &v, <span class="keywordtype">int</span> norepeats); |
---|
| 244 | <a name="l00248"></a>00248 <span class="keyword">extern</span> <span class="keyword">template</span> svec <a class="code" href="group__resampling.html#g9ff080d07845bcd2856aa13eff71b066" title="Repeats each column norepeats times in sequence.">repeat</a>(<span class="keyword">const</span> svec &v, <span class="keywordtype">int</span> norepeats); |
---|
| 245 | <a name="l00250"></a>00250 <span class="keyword">extern</span> <span class="keyword">template</span> ivec <a class="code" href="group__resampling.html#g9ff080d07845bcd2856aa13eff71b066" title="Repeats each column norepeats times in sequence.">repeat</a>(<span class="keyword">const</span> ivec &v, <span class="keywordtype">int</span> norepeats); |
---|
| 246 | <a name="l00252"></a>00252 <span class="keyword">extern</span> <span class="keyword">template</span> bvec <a class="code" href="group__resampling.html#g9ff080d07845bcd2856aa13eff71b066" title="Repeats each column norepeats times in sequence.">repeat</a>(<span class="keyword">const</span> bvec &v, <span class="keywordtype">int</span> norepeats); |
---|
| 247 | <a name="l00253"></a>00253 |
---|
| 248 | <a name="l00255"></a>00255 <span class="keyword">extern</span> <span class="keyword">template</span> mat <a class="code" href="group__resampling.html#g9ff080d07845bcd2856aa13eff71b066" title="Repeats each column norepeats times in sequence.">repeat</a>(<span class="keyword">const</span> mat &m, <span class="keywordtype">int</span> norepeats); |
---|
| 249 | <a name="l00257"></a>00257 <span class="keyword">extern</span> <span class="keyword">template</span> cmat <a class="code" href="group__resampling.html#g9ff080d07845bcd2856aa13eff71b066" title="Repeats each column norepeats times in sequence.">repeat</a>(<span class="keyword">const</span> cmat &m, <span class="keywordtype">int</span> norepeats); |
---|
| 250 | <a name="l00259"></a>00259 <span class="keyword">extern</span> <span class="keyword">template</span> smat <a class="code" href="group__resampling.html#g9ff080d07845bcd2856aa13eff71b066" title="Repeats each column norepeats times in sequence.">repeat</a>(<span class="keyword">const</span> smat &m, <span class="keywordtype">int</span> norepeats); |
---|
| 251 | <a name="l00261"></a>00261 <span class="keyword">extern</span> <span class="keyword">template</span> imat <a class="code" href="group__resampling.html#g9ff080d07845bcd2856aa13eff71b066" title="Repeats each column norepeats times in sequence.">repeat</a>(<span class="keyword">const</span> imat &m, <span class="keywordtype">int</span> norepeats); |
---|
| 252 | <a name="l00263"></a>00263 <span class="keyword">extern</span> <span class="keyword">template</span> <a class="code" href="mat_8h.html#f90acd1af41bf2d1d8a4bb23662fff69" title="bin matrix">bmat</a> <a class="code" href="group__resampling.html#g9ff080d07845bcd2856aa13eff71b066" title="Repeats each column norepeats times in sequence.">repeat</a>(<span class="keyword">const</span> <a class="code" href="mat_8h.html#f90acd1af41bf2d1d8a4bb23662fff69" title="bin matrix">bmat</a> &m, <span class="keywordtype">int</span> norepeats); |
---|
| 253 | <a name="l00264"></a>00264 |
---|
| 254 | <a name="l00266"></a>00266 <span class="keyword">extern</span> <span class="keyword">template</span> vec <a class="code" href="group__resampling.html#g3d871a62ec6d1cebc121b191eefaefdd" title="Upsample each column by inserting (usf-1) zeros after each column.">upsample</a>(<span class="keyword">const</span> vec &v, <span class="keywordtype">int</span> usf); |
---|
| 255 | <a name="l00268"></a>00268 <span class="keyword">extern</span> <span class="keyword">template</span> cvec <a class="code" href="group__resampling.html#g3d871a62ec6d1cebc121b191eefaefdd" title="Upsample each column by inserting (usf-1) zeros after each column.">upsample</a>(<span class="keyword">const</span> cvec &v, <span class="keywordtype">int</span> usf); |
---|
| 256 | <a name="l00270"></a>00270 <span class="keyword">extern</span> <span class="keyword">template</span> svec <a class="code" href="group__resampling.html#g3d871a62ec6d1cebc121b191eefaefdd" title="Upsample each column by inserting (usf-1) zeros after each column.">upsample</a>(<span class="keyword">const</span> svec &v, <span class="keywordtype">int</span> usf); |
---|
| 257 | <a name="l00272"></a>00272 <span class="keyword">extern</span> <span class="keyword">template</span> ivec <a class="code" href="group__resampling.html#g3d871a62ec6d1cebc121b191eefaefdd" title="Upsample each column by inserting (usf-1) zeros after each column.">upsample</a>(<span class="keyword">const</span> ivec &v, <span class="keywordtype">int</span> usf); |
---|
| 258 | <a name="l00274"></a>00274 <span class="keyword">extern</span> <span class="keyword">template</span> bvec <a class="code" href="group__resampling.html#g3d871a62ec6d1cebc121b191eefaefdd" title="Upsample each column by inserting (usf-1) zeros after each column.">upsample</a>(<span class="keyword">const</span> bvec &v, <span class="keywordtype">int</span> usf); |
---|
| 259 | <a name="l00275"></a>00275 |
---|
| 260 | <a name="l00277"></a>00277 <span class="keyword">extern</span> <span class="keyword">template</span> mat <a class="code" href="group__resampling.html#g3d871a62ec6d1cebc121b191eefaefdd" title="Upsample each column by inserting (usf-1) zeros after each column.">upsample</a>(<span class="keyword">const</span> mat &v, <span class="keywordtype">int</span> usf); |
---|
| 261 | <a name="l00279"></a>00279 <span class="keyword">extern</span> <span class="keyword">template</span> cmat <a class="code" href="group__resampling.html#g3d871a62ec6d1cebc121b191eefaefdd" title="Upsample each column by inserting (usf-1) zeros after each column.">upsample</a>(<span class="keyword">const</span> cmat &v, <span class="keywordtype">int</span> usf); |
---|
| 262 | <a name="l00281"></a>00281 <span class="keyword">extern</span> <span class="keyword">template</span> smat <a class="code" href="group__resampling.html#g3d871a62ec6d1cebc121b191eefaefdd" title="Upsample each column by inserting (usf-1) zeros after each column.">upsample</a>(<span class="keyword">const</span> smat &v, <span class="keywordtype">int</span> usf); |
---|
| 263 | <a name="l00283"></a>00283 <span class="keyword">extern</span> <span class="keyword">template</span> imat <a class="code" href="group__resampling.html#g3d871a62ec6d1cebc121b191eefaefdd" title="Upsample each column by inserting (usf-1) zeros after each column.">upsample</a>(<span class="keyword">const</span> imat &v, <span class="keywordtype">int</span> usf); |
---|
| 264 | <a name="l00285"></a>00285 <span class="keyword">extern</span> <span class="keyword">template</span> <a class="code" href="mat_8h.html#f90acd1af41bf2d1d8a4bb23662fff69" title="bin matrix">bmat</a> <a class="code" href="group__resampling.html#g3d871a62ec6d1cebc121b191eefaefdd" title="Upsample each column by inserting (usf-1) zeros after each column.">upsample</a>(<span class="keyword">const</span> <a class="code" href="mat_8h.html#f90acd1af41bf2d1d8a4bb23662fff69" title="bin matrix">bmat</a> &v, <span class="keywordtype">int</span> usf); |
---|
| 265 | <a name="l00286"></a>00286 |
---|
| 266 | <a name="l00288"></a>00288 <span class="keyword">extern</span> <span class="keyword">template</span> <span class="keywordtype">void</span> <a class="code" href="group__resampling.html#g3d871a62ec6d1cebc121b191eefaefdd" title="Upsample each column by inserting (usf-1) zeros after each column.">upsample</a>(<span class="keyword">const</span> vec &v, <span class="keywordtype">int</span> usf, vec &u); |
---|
| 267 | <a name="l00290"></a>00290 <span class="keyword">extern</span> <span class="keyword">template</span> <span class="keywordtype">void</span> <a class="code" href="group__resampling.html#g3d871a62ec6d1cebc121b191eefaefdd" title="Upsample each column by inserting (usf-1) zeros after each column.">upsample</a>(<span class="keyword">const</span> cvec &v, <span class="keywordtype">int</span> usf, cvec &u); |
---|
| 268 | <a name="l00292"></a>00292 <span class="keyword">extern</span> <span class="keyword">template</span> <span class="keywordtype">void</span> <a class="code" href="group__resampling.html#g3d871a62ec6d1cebc121b191eefaefdd" title="Upsample each column by inserting (usf-1) zeros after each column.">upsample</a>(<span class="keyword">const</span> svec &v, <span class="keywordtype">int</span> usf, svec &u); |
---|
| 269 | <a name="l00294"></a>00294 <span class="keyword">extern</span> <span class="keyword">template</span> <span class="keywordtype">void</span> <a class="code" href="group__resampling.html#g3d871a62ec6d1cebc121b191eefaefdd" title="Upsample each column by inserting (usf-1) zeros after each column.">upsample</a>(<span class="keyword">const</span> ivec &v, <span class="keywordtype">int</span> usf, ivec &u); |
---|
| 270 | <a name="l00296"></a>00296 <span class="keyword">extern</span> <span class="keyword">template</span> <span class="keywordtype">void</span> <a class="code" href="group__resampling.html#g3d871a62ec6d1cebc121b191eefaefdd" title="Upsample each column by inserting (usf-1) zeros after each column.">upsample</a>(<span class="keyword">const</span> bvec &v, <span class="keywordtype">int</span> usf, bvec &u); |
---|
| 271 | <a name="l00297"></a>00297 |
---|
| 272 | <a name="l00299"></a>00299 <span class="keyword">extern</span> <span class="keyword">template</span> <span class="keywordtype">void</span> <a class="code" href="group__resampling.html#g3d871a62ec6d1cebc121b191eefaefdd" title="Upsample each column by inserting (usf-1) zeros after each column.">upsample</a>(<span class="keyword">const</span> mat &v, <span class="keywordtype">int</span> usf, mat &u); |
---|
| 273 | <a name="l00301"></a>00301 <span class="keyword">extern</span> <span class="keyword">template</span> <span class="keywordtype">void</span> <a class="code" href="group__resampling.html#g3d871a62ec6d1cebc121b191eefaefdd" title="Upsample each column by inserting (usf-1) zeros after each column.">upsample</a>(<span class="keyword">const</span> cmat &v, <span class="keywordtype">int</span> usf, cmat &u); |
---|
| 274 | <a name="l00303"></a>00303 <span class="keyword">extern</span> <span class="keyword">template</span> <span class="keywordtype">void</span> <a class="code" href="group__resampling.html#g3d871a62ec6d1cebc121b191eefaefdd" title="Upsample each column by inserting (usf-1) zeros after each column.">upsample</a>(<span class="keyword">const</span> smat &v, <span class="keywordtype">int</span> usf, smat &u); |
---|
| 275 | <a name="l00305"></a>00305 <span class="keyword">extern</span> <span class="keyword">template</span> <span class="keywordtype">void</span> <a class="code" href="group__resampling.html#g3d871a62ec6d1cebc121b191eefaefdd" title="Upsample each column by inserting (usf-1) zeros after each column.">upsample</a>(<span class="keyword">const</span> imat &v, <span class="keywordtype">int</span> usf, imat &u); |
---|
| 276 | <a name="l00307"></a>00307 <span class="keyword">extern</span> <span class="keyword">template</span> <span class="keywordtype">void</span> <a class="code" href="group__resampling.html#g3d871a62ec6d1cebc121b191eefaefdd" title="Upsample each column by inserting (usf-1) zeros after each column.">upsample</a>(<span class="keyword">const</span> <a class="code" href="mat_8h.html#f90acd1af41bf2d1d8a4bb23662fff69" title="bin matrix">bmat</a> &v, <span class="keywordtype">int</span> usf, <a class="code" href="mat_8h.html#f90acd1af41bf2d1d8a4bb23662fff69" title="bin matrix">bmat</a> &u); |
---|
| 277 | <a name="l00308"></a>00308 |
---|
| 278 | <a name="l00310"></a>00310 <span class="keyword">extern</span> <span class="keyword">template</span> vec <a class="code" href="group__resampling.html#gc93cd1b7a5f6c6def70930bb63035f01" title="Upsample vector v to achieve f_ups frequency using linear interpolation.">lininterp</a>(<span class="keyword">const</span> vec &v, <span class="keywordtype">int</span> usf); |
---|
| 279 | <a name="l00312"></a>00312 <span class="keyword">extern</span> <span class="keyword">template</span> cvec <a class="code" href="group__resampling.html#gc93cd1b7a5f6c6def70930bb63035f01" title="Upsample vector v to achieve f_ups frequency using linear interpolation.">lininterp</a>(<span class="keyword">const</span> cvec &v, <span class="keywordtype">int</span> usf); |
---|
| 280 | <a name="l00313"></a>00313 |
---|
| 281 | <a name="l00315"></a>00315 <span class="keyword">extern</span> <span class="keyword">template</span> mat <a class="code" href="group__resampling.html#gc93cd1b7a5f6c6def70930bb63035f01" title="Upsample vector v to achieve f_ups frequency using linear interpolation.">lininterp</a>(<span class="keyword">const</span> mat &v, <span class="keywordtype">int</span> usf); |
---|
| 282 | <a name="l00317"></a>00317 <span class="keyword">extern</span> <span class="keyword">template</span> cmat <a class="code" href="group__resampling.html#gc93cd1b7a5f6c6def70930bb63035f01" title="Upsample vector v to achieve f_ups frequency using linear interpolation.">lininterp</a>(<span class="keyword">const</span> cmat &v, <span class="keywordtype">int</span> usf); |
---|
| 283 | <a name="l00318"></a>00318 |
---|
| 284 | <a name="l00320"></a>00320 <span class="keyword">extern</span> <span class="keyword">template</span> <span class="keywordtype">void</span> <a class="code" href="group__resampling.html#gc93cd1b7a5f6c6def70930bb63035f01" title="Upsample vector v to achieve f_ups frequency using linear interpolation.">lininterp</a>(<span class="keyword">const</span> vec &v, <span class="keywordtype">int</span> usf, vec &u); |
---|
| 285 | <a name="l00322"></a>00322 <span class="keyword">extern</span> <span class="keyword">template</span> <span class="keywordtype">void</span> <a class="code" href="group__resampling.html#gc93cd1b7a5f6c6def70930bb63035f01" title="Upsample vector v to achieve f_ups frequency using linear interpolation.">lininterp</a>(<span class="keyword">const</span> cvec &v, <span class="keywordtype">int</span> usf, cvec &u); |
---|
| 286 | <a name="l00323"></a>00323 |
---|
| 287 | <a name="l00325"></a>00325 <span class="keyword">extern</span> <span class="keyword">template</span> <span class="keywordtype">void</span> <a class="code" href="group__resampling.html#gc93cd1b7a5f6c6def70930bb63035f01" title="Upsample vector v to achieve f_ups frequency using linear interpolation.">lininterp</a>(<span class="keyword">const</span> mat &v, <span class="keywordtype">int</span> usf, mat &u); |
---|
| 288 | <a name="l00327"></a>00327 <span class="keyword">extern</span> <span class="keyword">template</span> <span class="keywordtype">void</span> <a class="code" href="group__resampling.html#gc93cd1b7a5f6c6def70930bb63035f01" title="Upsample vector v to achieve f_ups frequency using linear interpolation.">lininterp</a>(<span class="keyword">const</span> cmat &v, <span class="keywordtype">int</span> usf, cmat &u); |
---|
| 289 | <a name="l00328"></a>00328 |
---|
| 290 | <a name="l00330"></a>00330 <span class="keyword">extern</span> <span class="keyword">template</span> mat <a class="code" href="group__resampling.html#gc93cd1b7a5f6c6def70930bb63035f01" title="Upsample vector v to achieve f_ups frequency using linear interpolation.">lininterp</a>(<span class="keyword">const</span> mat &m, <span class="keywordtype">double</span> f_base, <span class="keywordtype">double</span> f_ups, <span class="keywordtype">int</span> nrof_samples, <span class="keywordtype">double</span> t_start); |
---|
| 291 | <a name="l00332"></a>00332 <span class="keyword">extern</span> <span class="keyword">template</span> cmat <a class="code" href="group__resampling.html#gc93cd1b7a5f6c6def70930bb63035f01" title="Upsample vector v to achieve f_ups frequency using linear interpolation.">lininterp</a>(<span class="keyword">const</span> cmat &m, <span class="keywordtype">double</span> f_base, <span class="keywordtype">double</span> f_ups, <span class="keywordtype">int</span> nrof_samples, <span class="keywordtype">double</span> t_start); |
---|
| 292 | <a name="l00333"></a>00333 |
---|
| 293 | <a name="l00335"></a>00335 <span class="keyword">extern</span> <span class="keyword">template</span> vec <a class="code" href="group__resampling.html#gc93cd1b7a5f6c6def70930bb63035f01" title="Upsample vector v to achieve f_ups frequency using linear interpolation.">lininterp</a>(<span class="keyword">const</span> vec &v, <span class="keywordtype">double</span> f_base, <span class="keywordtype">double</span> f_ups, <span class="keywordtype">int</span> nrof_samples, <span class="keywordtype">double</span> t_start); |
---|
| 294 | <a name="l00337"></a>00337 <span class="keyword">extern</span> <span class="keyword">template</span> cvec <a class="code" href="group__resampling.html#gc93cd1b7a5f6c6def70930bb63035f01" title="Upsample vector v to achieve f_ups frequency using linear interpolation.">lininterp</a>(<span class="keyword">const</span> cvec &v, <span class="keywordtype">double</span> f_base, <span class="keywordtype">double</span> f_ups, <span class="keywordtype">int</span> nrof_samples, <span class="keywordtype">double</span> t_start); |
---|
| 295 | <a name="l00338"></a>00338 |
---|
| 296 | <a name="l00339"></a>00339 <span class="preprocessor">#endif</span> |
---|
| 297 | <a name="l00340"></a>00340 <span class="preprocessor"></span> |
---|
| 298 | <a name="l00341"></a>00341 } <span class="comment">// namespace itpp</span> |
---|
| 299 | <a name="l00342"></a>00342 |
---|
| 300 | <a name="l00343"></a>00343 <span class="preprocessor">#endif // #ifndef RESAMPLING_H</span> |
---|
| 301 | <a name="l00344"></a>00344 <span class="preprocessor"></span> |
---|
| 302 | </pre></div></div> |
---|
| 303 | <hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:02:12 2009 for mixpp by |
---|
| 304 | <a href="http://www.doxygen.org/index.html"> |
---|
| 305 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> |
---|
| 306 | </body> |
---|
| 307 | </html> |
---|