[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: Reshaping of Vectors and Matrices</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><a href="files.html"><span>Files</span></a></li> |
---|
| 57 | </ul> |
---|
| 58 | </div> |
---|
| 59 | </div> |
---|
| 60 | <div class="contents"> |
---|
| 61 | <h1>Reshaping of Vectors and Matrices<br> |
---|
| 62 | <small> |
---|
| 63 | [<a class="el" href="group__base.html">Base Module</a>]</small> |
---|
| 64 | </h1><table border="0" cellpadding="0" cellspacing="0"> |
---|
| 65 | <tr><td></td></tr> |
---|
| 66 | <tr><td colspan="2"><br><h2>Functions</h2></td></tr> |
---|
| 67 | <tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="ge53eb5ba319eb6a25649576deeb9bca8"></a><!-- doxytag: member="reshaping::reverse" ref="ge53eb5ba319eb6a25649576deeb9bca8" args="(const Vec< T > &in)" --> |
---|
| 68 | template<class T > </td></tr> |
---|
| 69 | <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Vec< T > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__reshaping.html#ge53eb5ba319eb6a25649576deeb9bca8">itpp::reverse</a> (const Vec< T > &in)</td></tr> |
---|
| 70 | |
---|
| 71 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Reverse the input vector. <br></td></tr> |
---|
| 72 | <tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g67069e107b618a919a243f0f21fa8793"></a><!-- doxytag: member="reshaping::rvectorize" ref="g67069e107b618a919a243f0f21fa8793" args="(const Mat< T > &m)" --> |
---|
| 73 | template<class T > </td></tr> |
---|
| 74 | <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Vec< T > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__reshaping.html#g67069e107b618a919a243f0f21fa8793">itpp::rvectorize</a> (const Mat< T > &m)</td></tr> |
---|
| 75 | |
---|
| 76 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Row vectorize the matrix [(0,0) (0,1) ... (N-1,N-2) (N-1,N-1)]. <br></td></tr> |
---|
| 77 | <tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="g7796ab7ca5b96ce924c4e3f798f3fbe0"></a><!-- doxytag: member="reshaping::cvectorize" ref="g7796ab7ca5b96ce924c4e3f798f3fbe0" args="(const Mat< T > &m)" --> |
---|
| 78 | template<class T > </td></tr> |
---|
| 79 | <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Vec< T > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__reshaping.html#g7796ab7ca5b96ce924c4e3f798f3fbe0">itpp::cvectorize</a> (const Mat< T > &m)</td></tr> |
---|
| 80 | |
---|
| 81 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Column vectorize the matrix [(0,0) (1,0) ... (N-2,N-1) (N-1,N-1)]. <br></td></tr> |
---|
| 82 | <tr><td class="memTemplParams" nowrap colspan="2">template<class T > </td></tr> |
---|
| 83 | <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Mat< T > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__reshaping.html#gcf8bc686cea4d9b8d2ddd853ee0e3bc2">itpp::reshape</a> (const Mat< T > &m, int rows, int cols)</td></tr> |
---|
| 84 | |
---|
| 85 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Reshape the matrix into an rows*cols matrix. <a href="#gcf8bc686cea4d9b8d2ddd853ee0e3bc2"></a><br></td></tr> |
---|
| 86 | <tr><td class="memTemplParams" nowrap colspan="2">template<class T > </td></tr> |
---|
| 87 | <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">Mat< T > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__reshaping.html#gcaa0a45900248d17792ec91b2ab94dfb">itpp::reshape</a> (const Vec< T > &v, int rows, int cols)</td></tr> |
---|
| 88 | |
---|
| 89 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Reshape the vector into an rows*cols matrix. <a href="#gcaa0a45900248d17792ec91b2ab94dfb"></a><br></td></tr> |
---|
| 90 | </table> |
---|
| 91 | <hr><h2>Function Documentation</h2> |
---|
| 92 | <a class="anchor" name="gcaa0a45900248d17792ec91b2ab94dfb"></a><!-- doxytag: member="itpp::reshape" ref="gcaa0a45900248d17792ec91b2ab94dfb" args="(const Vec< T > &v, int rows, int cols)" --> |
---|
| 93 | <div class="memitem"> |
---|
| 94 | <div class="memproto"> |
---|
| 95 | <div class="memtemplate"> |
---|
| 96 | template<class T > </div> |
---|
| 97 | <table class="memname"> |
---|
| 98 | <tr> |
---|
| 99 | <td class="memname">Mat<T> itpp::reshape </td> |
---|
| 100 | <td>(</td> |
---|
| 101 | <td class="paramtype">const Vec< T > & </td> |
---|
| 102 | <td class="paramname"> <em>v</em>, </td> |
---|
| 103 | </tr> |
---|
| 104 | <tr> |
---|
| 105 | <td class="paramkey"></td> |
---|
| 106 | <td></td> |
---|
| 107 | <td class="paramtype">int </td> |
---|
| 108 | <td class="paramname"> <em>rows</em>, </td> |
---|
| 109 | </tr> |
---|
| 110 | <tr> |
---|
| 111 | <td class="paramkey"></td> |
---|
| 112 | <td></td> |
---|
| 113 | <td class="paramtype">int </td> |
---|
| 114 | <td class="paramname"> <em>cols</em></td><td> </td> |
---|
| 115 | </tr> |
---|
| 116 | <tr> |
---|
| 117 | <td></td> |
---|
| 118 | <td>)</td> |
---|
| 119 | <td></td><td></td><td><code> [inline]</code></td> |
---|
| 120 | </tr> |
---|
| 121 | </table> |
---|
| 122 | </div> |
---|
| 123 | <div class="memdoc"> |
---|
| 124 | |
---|
| 125 | <p> |
---|
| 126 | Reshape the vector into an rows*cols matrix. |
---|
| 127 | <p> |
---|
| 128 | The data is element by element from the vector and written columnwise into the new matrix. |
---|
| 129 | <p>References <a class="el" href="itassert_8h-source.html#l00107">it_assert_debug</a>, and <a class="el" href="vec_8h-source.html#l00277">itpp::Vec< Num_T >::size()</a>.</p> |
---|
| 130 | |
---|
| 131 | <p>Referenced by <a class="el" href="libEF_8cpp-source.html#l00021">bdm::egiw::evallog_nn()</a>.</p> |
---|
| 132 | |
---|
| 133 | </div> |
---|
| 134 | </div><p> |
---|
| 135 | <a class="anchor" name="gcf8bc686cea4d9b8d2ddd853ee0e3bc2"></a><!-- doxytag: member="itpp::reshape" ref="gcf8bc686cea4d9b8d2ddd853ee0e3bc2" args="(const Mat< T > &m, int rows, int cols)" --> |
---|
| 136 | <div class="memitem"> |
---|
| 137 | <div class="memproto"> |
---|
| 138 | <div class="memtemplate"> |
---|
| 139 | template<class T > </div> |
---|
| 140 | <table class="memname"> |
---|
| 141 | <tr> |
---|
| 142 | <td class="memname">Mat<T> itpp::reshape </td> |
---|
| 143 | <td>(</td> |
---|
| 144 | <td class="paramtype">const Mat< T > & </td> |
---|
| 145 | <td class="paramname"> <em>m</em>, </td> |
---|
| 146 | </tr> |
---|
| 147 | <tr> |
---|
| 148 | <td class="paramkey"></td> |
---|
| 149 | <td></td> |
---|
| 150 | <td class="paramtype">int </td> |
---|
| 151 | <td class="paramname"> <em>rows</em>, </td> |
---|
| 152 | </tr> |
---|
| 153 | <tr> |
---|
| 154 | <td class="paramkey"></td> |
---|
| 155 | <td></td> |
---|
| 156 | <td class="paramtype">int </td> |
---|
| 157 | <td class="paramname"> <em>cols</em></td><td> </td> |
---|
| 158 | </tr> |
---|
| 159 | <tr> |
---|
| 160 | <td></td> |
---|
| 161 | <td>)</td> |
---|
| 162 | <td></td><td></td><td><code> [inline]</code></td> |
---|
| 163 | </tr> |
---|
| 164 | </table> |
---|
| 165 | </div> |
---|
| 166 | <div class="memdoc"> |
---|
| 167 | |
---|
| 168 | <p> |
---|
| 169 | Reshape the matrix into an rows*cols matrix. |
---|
| 170 | <p> |
---|
| 171 | The data is taken columnwise from the original matrix and written columnwise into the new matrix. |
---|
| 172 | <p>References <a class="el" href="mat_8h-source.html#l00241">itpp::Mat< Num_T >::cols()</a>, <a class="el" href="itassert_8h-source.html#l00107">it_assert_debug</a>, and <a class="el" href="mat_8h-source.html#l00243">itpp::Mat< Num_T >::rows()</a>.</p> |
---|
| 173 | |
---|
| 174 | </div> |
---|
| 175 | </div><p> |
---|
| 176 | </div> |
---|
| 177 | <hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:02:14 2009 for mixpp by |
---|
| 178 | <a href="http://www.doxygen.org/index.html"> |
---|
| 179 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> |
---|
| 180 | </body> |
---|
| 181 | </html> |
---|