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: specmat.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>specmat.h</h1><a href="specmat_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 |
---|
66 | <a name="l00030"></a>00030 <span class="preprocessor">#ifndef SPECMAT_H</span> |
---|
67 | <a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#define SPECMAT_H</span> |
---|
68 | <a name="l00032"></a>00032 <span class="preprocessor"></span> |
---|
69 | <a name="l00033"></a>00033 <span class="preprocessor">#include <<a class="code" href="vec_8h.html" title="Templated Vector Class Definitions.">itpp/base/vec.h</a>></span> |
---|
70 | <a name="l00034"></a>00034 <span class="preprocessor">#include <<a class="code" href="mat_8h.html" title="Matrix Class Definitions.">itpp/base/mat.h</a>></span> |
---|
71 | <a name="l00035"></a>00035 |
---|
72 | <a name="l00036"></a>00036 |
---|
73 | <a name="l00037"></a>00037 <span class="keyword">namespace </span>itpp |
---|
74 | <a name="l00038"></a>00038 { |
---|
75 | <a name="l00039"></a>00039 |
---|
76 | <a name="l00044"></a>00044 ivec <a class="code" href="group__miscfunc.html#gb4c27649f062628f2fc64489ba11e670" title="Return a integer vector with indicies where bvec == 1.">find</a>(<span class="keyword">const</span> bvec &invector); |
---|
77 | <a name="l00045"></a>00045 |
---|
78 | <a name="l00050"></a>00050 |
---|
79 | <a name="l00051"></a>00051 |
---|
80 | <a name="l00052"></a>00052 |
---|
81 | <a name="l00054"></a>00054 vec <a class="code" href="group__specmat.html#gdc0f3edbf58bced9e82d8b260d395cac" title="A float (rows,cols)-matrix of ones.">ones</a>(<span class="keywordtype">int</span> <a class="code" href="group__matrix__functions.html#g3c1a2b0972c6a8e1215eb3f76d7c7512" title="Length of vector.">size</a>); |
---|
82 | <a name="l00056"></a>00056 bvec <a class="code" href="group__specmat.html#g8bbe1bc019c73f32dc796b276ed7aa2e" title="A Binary (rows,cols)-matrix of ones.">ones_b</a>(<span class="keywordtype">int</span> <a class="code" href="group__matrix__functions.html#g3c1a2b0972c6a8e1215eb3f76d7c7512" title="Length of vector.">size</a>); |
---|
83 | <a name="l00058"></a>00058 ivec <a class="code" href="group__specmat.html#g7c2c02190b4aa222cc692641cc3a73c7" title="A Int (rows,cols)-matrix of ones.">ones_i</a>(<span class="keywordtype">int</span> <a class="code" href="group__matrix__functions.html#g3c1a2b0972c6a8e1215eb3f76d7c7512" title="Length of vector.">size</a>); |
---|
84 | <a name="l00060"></a>00060 cvec <a class="code" href="group__specmat.html#g593a539551f14bd6241701910a106b16" title="A Double Complex (rows,cols)-matrix of ones.">ones_c</a>(<span class="keywordtype">int</span> <a class="code" href="group__matrix__functions.html#g3c1a2b0972c6a8e1215eb3f76d7c7512" title="Length of vector.">size</a>); |
---|
85 | <a name="l00061"></a>00061 |
---|
86 | <a name="l00063"></a>00063 mat <a class="code" href="group__specmat.html#gdc0f3edbf58bced9e82d8b260d395cac" title="A float (rows,cols)-matrix of ones.">ones</a>(<span class="keywordtype">int</span> rows, <span class="keywordtype">int</span> cols); |
---|
87 | <a name="l00065"></a>00065 <a class="code" href="mat_8h.html#f90acd1af41bf2d1d8a4bb23662fff69" title="bin matrix">bmat</a> <a class="code" href="group__specmat.html#g8bbe1bc019c73f32dc796b276ed7aa2e" title="A Binary (rows,cols)-matrix of ones.">ones_b</a>(<span class="keywordtype">int</span> rows, <span class="keywordtype">int</span> cols); |
---|
88 | <a name="l00067"></a>00067 imat <a class="code" href="group__specmat.html#g7c2c02190b4aa222cc692641cc3a73c7" title="A Int (rows,cols)-matrix of ones.">ones_i</a>(<span class="keywordtype">int</span> rows, <span class="keywordtype">int</span> cols); |
---|
89 | <a name="l00069"></a>00069 cmat <a class="code" href="group__specmat.html#g593a539551f14bd6241701910a106b16" title="A Double Complex (rows,cols)-matrix of ones.">ones_c</a>(<span class="keywordtype">int</span> rows, <span class="keywordtype">int</span> cols); |
---|
90 | <a name="l00070"></a>00070 |
---|
91 | <a name="l00072"></a>00072 vec <a class="code" href="group__specmat.html#g10723ecada06221cbe64fe2736a59de1" title="A Double (rows,cols)-matrix of zeros.">zeros</a>(<span class="keywordtype">int</span> <a class="code" href="group__matrix__functions.html#g3c1a2b0972c6a8e1215eb3f76d7c7512" title="Length of vector.">size</a>); |
---|
92 | <a name="l00074"></a>00074 bvec <a class="code" href="group__specmat.html#g8f5e0472807d1f2b4296594e7fd01027" title="A Binary (rows,cols)-matrix of zeros.">zeros_b</a>(<span class="keywordtype">int</span> <a class="code" href="group__matrix__functions.html#g3c1a2b0972c6a8e1215eb3f76d7c7512" title="Length of vector.">size</a>); |
---|
93 | <a name="l00076"></a>00076 ivec <a class="code" href="group__specmat.html#g9df9aa3553b6a5c07924954b85466cec" title="A Int (rows,cols)-matrix of zeros.">zeros_i</a>(<span class="keywordtype">int</span> <a class="code" href="group__matrix__functions.html#g3c1a2b0972c6a8e1215eb3f76d7c7512" title="Length of vector.">size</a>); |
---|
94 | <a name="l00078"></a>00078 cvec <a class="code" href="group__specmat.html#g7850aa51041a98644ed191017f101340" title="A Double Complex (rows,cols)-matrix of zeros.">zeros_c</a>(<span class="keywordtype">int</span> <a class="code" href="group__matrix__functions.html#g3c1a2b0972c6a8e1215eb3f76d7c7512" title="Length of vector.">size</a>); |
---|
95 | <a name="l00079"></a>00079 |
---|
96 | <a name="l00081"></a>00081 mat <a class="code" href="group__specmat.html#g10723ecada06221cbe64fe2736a59de1" title="A Double (rows,cols)-matrix of zeros.">zeros</a>(<span class="keywordtype">int</span> rows, <span class="keywordtype">int</span> cols); |
---|
97 | <a name="l00083"></a>00083 <a class="code" href="mat_8h.html#f90acd1af41bf2d1d8a4bb23662fff69" title="bin matrix">bmat</a> <a class="code" href="group__specmat.html#g8f5e0472807d1f2b4296594e7fd01027" title="A Binary (rows,cols)-matrix of zeros.">zeros_b</a>(<span class="keywordtype">int</span> rows, <span class="keywordtype">int</span> cols); |
---|
98 | <a name="l00085"></a>00085 imat <a class="code" href="group__specmat.html#g9df9aa3553b6a5c07924954b85466cec" title="A Int (rows,cols)-matrix of zeros.">zeros_i</a>(<span class="keywordtype">int</span> rows, <span class="keywordtype">int</span> cols); |
---|
99 | <a name="l00087"></a>00087 cmat <a class="code" href="group__specmat.html#g7850aa51041a98644ed191017f101340" title="A Double Complex (rows,cols)-matrix of zeros.">zeros_c</a>(<span class="keywordtype">int</span> rows, <span class="keywordtype">int</span> cols); |
---|
100 | <a name="l00088"></a>00088 |
---|
101 | <a name="l00090"></a>00090 mat <a class="code" href="group__specmat.html#gbfc73e72a56769280cd9fda812367196" title="A non-copying version of the eye function.">eye</a>(<span class="keywordtype">int</span> <a class="code" href="group__matrix__functions.html#g3c1a2b0972c6a8e1215eb3f76d7c7512" title="Length of vector.">size</a>); |
---|
102 | <a name="l00092"></a>00092 <a class="code" href="mat_8h.html#f90acd1af41bf2d1d8a4bb23662fff69" title="bin matrix">bmat</a> <a class="code" href="group__specmat.html#gbbde61be8b986fd19ad1c9dc792e10e2" title="A Binary (size,size) unit matrix.">eye_b</a>(<span class="keywordtype">int</span> <a class="code" href="group__matrix__functions.html#g3c1a2b0972c6a8e1215eb3f76d7c7512" title="Length of vector.">size</a>); |
---|
103 | <a name="l00094"></a>00094 imat <a class="code" href="group__specmat.html#g31d445a0a63bcf661f18f900062d5110" title="A Int (size,size) unit matrix.">eye_i</a>(<span class="keywordtype">int</span> <a class="code" href="group__matrix__functions.html#g3c1a2b0972c6a8e1215eb3f76d7c7512" title="Length of vector.">size</a>); |
---|
104 | <a name="l00096"></a>00096 cmat <a class="code" href="group__specmat.html#gfc47b09fb906e391212e488b009e6fdf" title="A Double Complex (size,size) unit matrix.">eye_c</a>(<span class="keywordtype">int</span> <a class="code" href="group__matrix__functions.html#g3c1a2b0972c6a8e1215eb3f76d7c7512" title="Length of vector.">size</a>); |
---|
105 | <a name="l00098"></a>00098 <span class="keyword">template</span> <<span class="keyword">class</span> T> |
---|
106 | <a name="l00099"></a>00099 <span class="keywordtype">void</span> <a class="code" href="group__specmat.html#gbfc73e72a56769280cd9fda812367196" title="A non-copying version of the eye function.">eye</a>(<span class="keywordtype">int</span> <a class="code" href="group__matrix__functions.html#g3c1a2b0972c6a8e1215eb3f76d7c7512" title="Length of vector.">size</a>, Mat<T> &m); |
---|
107 | <a name="l00100"></a>00100 |
---|
108 | <a name="l00102"></a>00102 vec <a class="code" href="group__specmat.html#g69cec3c441dfa7b6e9627b485b0b80d7" title="Impulse vector.">impulse</a>(<span class="keywordtype">int</span> <a class="code" href="group__matrix__functions.html#g3c1a2b0972c6a8e1215eb3f76d7c7512" title="Length of vector.">size</a>); |
---|
109 | <a name="l00104"></a>00104 vec <a class="code" href="group__specmat.html#ge5632baa525e231b015f3d45f3503cac" title="Linspace (works in the same way as the matlab version).">linspace</a>(<span class="keywordtype">double</span> from, <span class="keywordtype">double</span> <a class="code" href="group__fixed.html#g77ba7ec514a9115a0d560b60de9e0cea" title="Convert Array&lt;U&gt; (real and imaginary parts), where U can be an Array/Vec/Mat...">to</a>, <span class="keywordtype">int</span> <a class="code" href="group__matrix__functions.html#g97bb6b35d6d4c683c7558842e4500c2d" title="Length of vector.">length</a> = 100); |
---|
110 | <a name="l00133"></a>00133 vec <a class="code" href="group__specmat.html#g81e638d011c3be35eb900db4691ac663" title="Zig-zag space function (variation on linspace).">zigzag_space</a>(<span class="keywordtype">double</span> t0, <span class="keywordtype">double</span> t1, <span class="keywordtype">int</span> K = 5); |
---|
111 | <a name="l00134"></a>00134 |
---|
112 | <a name="l00141"></a>00141 imat <a class="code" href="group__specmat.html#g10afe3456dd34b57639dee69e8f7d06f" title="Hadamard matrix.">hadamard</a>(<span class="keywordtype">int</span> <a class="code" href="group__matrix__functions.html#g3c1a2b0972c6a8e1215eb3f76d7c7512" title="Length of vector.">size</a>); |
---|
113 | <a name="l00142"></a>00142 |
---|
114 | <a name="l00159"></a>00159 imat <a class="code" href="group__specmat.html#g36320b9a2493b5c4c3ff3d048fdd5390" title="Jacobsthal matrix.">jacobsthal</a>(<span class="keywordtype">int</span> p); |
---|
115 | <a name="l00160"></a>00160 |
---|
116 | <a name="l00174"></a>00174 imat <a class="code" href="group__specmat.html#gaedb7979abc426d27338c49372338b8d" title="Conference matrix.">conference</a>(<span class="keywordtype">int</span> n); |
---|
117 | <a name="l00175"></a>00175 |
---|
118 | <a name="l00199"></a>00199 <span class="keyword">template</span> <<span class="keyword">typename</span> Num_T> |
---|
119 | <a name="l00200"></a><a class="code" href="group__specmat.html#gdceb476e87115118925d84cc35f3904c">00200</a> <span class="keyword">const</span> <a class="code" href="classitpp_1_1Mat.html" title="Matrix Class (Templated).">Mat<Num_T></a> <a class="code" href="group__specmat.html#g3ab0fe843dd23ee39f2b16e31d8db975" title="Generate symmetric Toeplitz matrix from vector c.">toeplitz</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Vec.html" title="Vector Class (Templated).">Vec<Num_T></a> &c, <span class="keyword">const</span> <a class="code" href="classitpp_1_1Vec.html" title="Vector Class (Templated).">Vec<Num_T></a> &r) |
---|
120 | <a name="l00201"></a>00201 { |
---|
121 | <a name="l00202"></a>00202 <span class="keywordtype">int</span> n_rows = c.<a class="code" href="classitpp_1_1Vec.html#a906c893cd6184a774e4da8a47217d6a" title="The size of the vector.">size</a>(); |
---|
122 | <a name="l00203"></a>00203 <span class="keywordtype">int</span> n_cols = r.<a class="code" href="classitpp_1_1Vec.html#a906c893cd6184a774e4da8a47217d6a" title="The size of the vector.">size</a>(); |
---|
123 | <a name="l00204"></a>00204 <a class="code" href="classitpp_1_1Mat.html" title="Matrix Class (Templated).">Mat<Num_T></a> output(n_rows, n_cols); |
---|
124 | <a name="l00205"></a>00205 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < n_rows; ++i) { |
---|
125 | <a name="l00206"></a>00206 <span class="keywordtype">int</span> j_limit = <a class="code" href="group__protocol.html#g27dde5be5aac902c0de838b4b872cd2f" title="ADD DOCUMENTATION HERE.">std::min</a>(n_cols, n_rows - i); |
---|
126 | <a name="l00207"></a>00207 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j < j_limit; ++j) { |
---|
127 | <a name="l00208"></a>00208 output(i + j, j) = c(i); |
---|
128 | <a name="l00209"></a>00209 } |
---|
129 | <a name="l00210"></a>00210 } |
---|
130 | <a name="l00211"></a>00211 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 1; j < n_cols; ++j) { |
---|
131 | <a name="l00212"></a>00212 <span class="keywordtype">int</span> i_limit = <a class="code" href="group__protocol.html#g27dde5be5aac902c0de838b4b872cd2f" title="ADD DOCUMENTATION HERE.">std::min</a>(n_rows, n_cols - j); |
---|
132 | <a name="l00213"></a>00213 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < i_limit; ++i) { |
---|
133 | <a name="l00214"></a>00214 output(i, i + j) = r(j); |
---|
134 | <a name="l00215"></a>00215 } |
---|
135 | <a name="l00216"></a>00216 } |
---|
136 | <a name="l00217"></a>00217 <span class="keywordflow">return</span> output; |
---|
137 | <a name="l00218"></a>00218 } |
---|
138 | <a name="l00219"></a>00219 |
---|
139 | <a name="l00221"></a>00221 <span class="keyword">template</span> <<span class="keyword">typename</span> Num_T> |
---|
140 | <a name="l00222"></a><a class="code" href="group__specmat.html#g3ab0fe843dd23ee39f2b16e31d8db975">00222</a> <span class="keyword">const</span> <a class="code" href="classitpp_1_1Mat.html" title="Matrix Class (Templated).">Mat<Num_T></a> <a class="code" href="group__specmat.html#g3ab0fe843dd23ee39f2b16e31d8db975" title="Generate symmetric Toeplitz matrix from vector c.">toeplitz</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Vec.html" title="Vector Class (Templated).">Vec<Num_T></a> &c) |
---|
141 | <a name="l00223"></a>00223 { |
---|
142 | <a name="l00224"></a>00224 <span class="keywordtype">int</span> s = c.<a class="code" href="classitpp_1_1Vec.html#a906c893cd6184a774e4da8a47217d6a" title="The size of the vector.">size</a>(); |
---|
143 | <a name="l00225"></a>00225 <a class="code" href="classitpp_1_1Mat.html" title="Matrix Class (Templated).">Mat<Num_T></a> output(s, s); |
---|
144 | <a name="l00226"></a>00226 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < s; ++i) { |
---|
145 | <a name="l00227"></a>00227 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j < s - i; ++j) { |
---|
146 | <a name="l00228"></a>00228 output(i + j, j) = c(i); |
---|
147 | <a name="l00229"></a>00229 } |
---|
148 | <a name="l00230"></a>00230 } |
---|
149 | <a name="l00231"></a>00231 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 1; j < s; ++j) { |
---|
150 | <a name="l00232"></a>00232 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < s - j; ++i) { |
---|
151 | <a name="l00233"></a>00233 output(i, i + j) = c(j); |
---|
152 | <a name="l00234"></a>00234 } |
---|
153 | <a name="l00235"></a>00235 } |
---|
154 | <a name="l00236"></a>00236 <span class="keywordflow">return</span> output; |
---|
155 | <a name="l00237"></a>00237 } |
---|
156 | <a name="l00238"></a>00238 |
---|
157 | <a name="l00240"></a>00240 <span class="keyword">template</span> <> |
---|
158 | <a name="l00241"></a>00241 <span class="keyword">const</span> cmat <a class="code" href="group__specmat.html#g3ab0fe843dd23ee39f2b16e31d8db975" title="Generate symmetric Toeplitz matrix from vector c.">toeplitz</a>(<span class="keyword">const</span> cvec &c); |
---|
159 | <a name="l00242"></a>00242 |
---|
160 | <a name="l00244"></a>00244 |
---|
161 | <a name="l00245"></a>00245 |
---|
162 | <a name="l00250"></a>00250 mat <a class="code" href="group__miscfunc.html#g3daf8851003f57ff14316570c74aa57f" title="Create a rotation matrix that rotates the given plane angle radians. Note that the...">rotation_matrix</a>(<span class="keywordtype">int</span> dim, <span class="keywordtype">int</span> plane1, <span class="keywordtype">int</span> plane2, <span class="keywordtype">double</span> <a class="code" href="group__miscfunc.html#g7048bf874e72c1d95922adaedef34d8f" title="Angle.">angle</a>); |
---|
163 | <a name="l00251"></a>00251 |
---|
164 | <a name="l00256"></a>00256 <span class="keywordtype">void</span> <a class="code" href="group__miscfunc.html#gaa866f9a6cf557f264fb86096593df66" title="Calcualte the Householder vector.">house</a>(<span class="keyword">const</span> vec &x, vec &v, <span class="keywordtype">double</span> &beta); |
---|
165 | <a name="l00257"></a>00257 |
---|
166 | <a name="l00262"></a>00262 <span class="keywordtype">void</span> <a class="code" href="group__miscfunc.html#g7d19e36d093027b98ca156432fa84f3f" title="Calculate the Givens rotation matrix.">givens</a>(<span class="keywordtype">double</span> a, <span class="keywordtype">double</span> b, <span class="keywordtype">double</span> &c, <span class="keywordtype">double</span> &s); |
---|
167 | <a name="l00263"></a>00263 |
---|
168 | <a name="l00268"></a>00268 <span class="keywordtype">void</span> <a class="code" href="group__miscfunc.html#g7d19e36d093027b98ca156432fa84f3f" title="Calculate the Givens rotation matrix.">givens</a>(<span class="keywordtype">double</span> a, <span class="keywordtype">double</span> b, mat &m); |
---|
169 | <a name="l00269"></a>00269 |
---|
170 | <a name="l00274"></a>00274 mat <a class="code" href="group__miscfunc.html#g7d19e36d093027b98ca156432fa84f3f" title="Calculate the Givens rotation matrix.">givens</a>(<span class="keywordtype">double</span> a, <span class="keywordtype">double</span> b); |
---|
171 | <a name="l00275"></a>00275 |
---|
172 | <a name="l00280"></a>00280 <span class="keywordtype">void</span> <a class="code" href="group__miscfunc.html#g78837eb8567bf3f447a9db18df79dcbb" title="Calculate the transposed Givens rotation matrix.">givens_t</a>(<span class="keywordtype">double</span> a, <span class="keywordtype">double</span> b, mat &m); |
---|
173 | <a name="l00281"></a>00281 |
---|
174 | <a name="l00286"></a>00286 mat <a class="code" href="group__miscfunc.html#g78837eb8567bf3f447a9db18df79dcbb" title="Calculate the transposed Givens rotation matrix.">givens_t</a>(<span class="keywordtype">double</span> a, <span class="keywordtype">double</span> b); |
---|
175 | <a name="l00287"></a>00287 |
---|
176 | <a name="l00292"></a>00292 <span class="keyword">template</span> <<span class="keyword">class</span> T> |
---|
177 | <a name="l00293"></a><a class="code" href="classitpp_1_1Vec.html#39b0a99c2c13ce719102c3f348d36fa3">00293</a> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> vec_1(T v0) |
---|
178 | <a name="l00294"></a>00294 { |
---|
179 | <a name="l00295"></a>00295 <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> v(1); |
---|
180 | <a name="l00296"></a>00296 v(0) = v0; |
---|
181 | <a name="l00297"></a>00297 <span class="keywordflow">return</span> v; |
---|
182 | <a name="l00298"></a>00298 } |
---|
183 | <a name="l00299"></a>00299 |
---|
184 | <a name="l00304"></a>00304 <span class="keyword">template</span> <<span class="keyword">class</span> T> |
---|
185 | <a name="l00305"></a><a class="code" href="classitpp_1_1Vec.html#0a4cc56fac86f6ea2cdd71d04dacbe5e">00305</a> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> vec_2(T v0, T v1) |
---|
186 | <a name="l00306"></a>00306 { |
---|
187 | <a name="l00307"></a>00307 <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> v(2); |
---|
188 | <a name="l00308"></a>00308 v(0) = v0; |
---|
189 | <a name="l00309"></a>00309 v(1) = v1; |
---|
190 | <a name="l00310"></a>00310 <span class="keywordflow">return</span> v; |
---|
191 | <a name="l00311"></a>00311 } |
---|
192 | <a name="l00312"></a>00312 |
---|
193 | <a name="l00317"></a>00317 <span class="keyword">template</span> <<span class="keyword">class</span> T> |
---|
194 | <a name="l00318"></a><a class="code" href="classitpp_1_1Vec.html#1fb035a69c12839ba58b008070f41038">00318</a> <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> vec_3(T v0, T v1, T v2) |
---|
195 | <a name="l00319"></a>00319 { |
---|
196 | <a name="l00320"></a>00320 <a class="code" href="classitpp_1_1Vec.html">Vec<T></a> v(3); |
---|
197 | <a name="l00321"></a>00321 v(0) = v0; |
---|
198 | <a name="l00322"></a>00322 v(1) = v1; |
---|
199 | <a name="l00323"></a>00323 v(2) = v2; |
---|
200 | <a name="l00324"></a>00324 <span class="keywordflow">return</span> v; |
---|
201 | <a name="l00325"></a>00325 } |
---|
202 | <a name="l00326"></a>00326 |
---|
203 | <a name="l00331"></a>00331 <span class="keyword">template</span> <<span class="keyword">class</span> T> |
---|
204 | <a name="l00332"></a><a class="code" href="classitpp_1_1Mat.html#1901f6273b19e2fbaeb19713aac7b475">00332</a> <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> mat_1x1(T m00) |
---|
205 | <a name="l00333"></a>00333 { |
---|
206 | <a name="l00334"></a>00334 <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> m(1, 1); |
---|
207 | <a name="l00335"></a>00335 m(0, 0) = m00; |
---|
208 | <a name="l00336"></a>00336 <span class="keywordflow">return</span> m; |
---|
209 | <a name="l00337"></a>00337 } |
---|
210 | <a name="l00338"></a>00338 |
---|
211 | <a name="l00343"></a>00343 <span class="keyword">template</span> <<span class="keyword">class</span> T> |
---|
212 | <a name="l00344"></a><a class="code" href="classitpp_1_1Mat.html#0fa7701a41fe2d94b66198e116a76467">00344</a> <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> mat_1x2(T m00, T m01) |
---|
213 | <a name="l00345"></a>00345 { |
---|
214 | <a name="l00346"></a>00346 <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> m(1, 2); |
---|
215 | <a name="l00347"></a>00347 m(0, 0) = m00; |
---|
216 | <a name="l00348"></a>00348 m(0, 1) = m01; |
---|
217 | <a name="l00349"></a>00349 <span class="keywordflow">return</span> m; |
---|
218 | <a name="l00350"></a>00350 } |
---|
219 | <a name="l00351"></a>00351 |
---|
220 | <a name="l00356"></a>00356 <span class="keyword">template</span> <<span class="keyword">class</span> T> |
---|
221 | <a name="l00357"></a><a class="code" href="classitpp_1_1Mat.html#ecc67614d88981dfccb8e4e1b1769a8a">00357</a> <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> mat_2x1(T m00, |
---|
222 | <a name="l00358"></a>00358 T m10) |
---|
223 | <a name="l00359"></a>00359 { |
---|
224 | <a name="l00360"></a>00360 <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> m(2, 1); |
---|
225 | <a name="l00361"></a>00361 m(0, 0) = m00; |
---|
226 | <a name="l00362"></a>00362 m(1, 0) = m10; |
---|
227 | <a name="l00363"></a>00363 <span class="keywordflow">return</span> m; |
---|
228 | <a name="l00364"></a>00364 } |
---|
229 | <a name="l00365"></a>00365 |
---|
230 | <a name="l00370"></a>00370 <span class="keyword">template</span> <<span class="keyword">class</span> T> |
---|
231 | <a name="l00371"></a><a class="code" href="classitpp_1_1Mat.html#e42dd32f4ba193e4e6304c4044115457">00371</a> <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> mat_2x2(T m00, T m01, |
---|
232 | <a name="l00372"></a>00372 T m10, T m11) |
---|
233 | <a name="l00373"></a>00373 { |
---|
234 | <a name="l00374"></a>00374 <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> m(2, 2); |
---|
235 | <a name="l00375"></a>00375 m(0, 0) = m00; |
---|
236 | <a name="l00376"></a>00376 m(0, 1) = m01; |
---|
237 | <a name="l00377"></a>00377 m(1, 0) = m10; |
---|
238 | <a name="l00378"></a>00378 m(1, 1) = m11; |
---|
239 | <a name="l00379"></a>00379 <span class="keywordflow">return</span> m; |
---|
240 | <a name="l00380"></a>00380 } |
---|
241 | <a name="l00381"></a>00381 |
---|
242 | <a name="l00386"></a>00386 <span class="keyword">template</span> <<span class="keyword">class</span> T> |
---|
243 | <a name="l00387"></a><a class="code" href="classitpp_1_1Mat.html#6833fa0a2870fb0599ad9cfee24716c7">00387</a> <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> mat_1x3(T m00, T m01, T m02) |
---|
244 | <a name="l00388"></a>00388 { |
---|
245 | <a name="l00389"></a>00389 <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> m(1, 3); |
---|
246 | <a name="l00390"></a>00390 m(0, 0) = m00; |
---|
247 | <a name="l00391"></a>00391 m(0, 1) = m01; |
---|
248 | <a name="l00392"></a>00392 m(0, 2) = m02; |
---|
249 | <a name="l00393"></a>00393 <span class="keywordflow">return</span> m; |
---|
250 | <a name="l00394"></a>00394 } |
---|
251 | <a name="l00395"></a>00395 |
---|
252 | <a name="l00400"></a>00400 <span class="keyword">template</span> <<span class="keyword">class</span> T> |
---|
253 | <a name="l00401"></a><a class="code" href="classitpp_1_1Mat.html#fdd7dc8c7a7b7f299894b3b70bd2d8a9">00401</a> <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> mat_3x1(T m00, |
---|
254 | <a name="l00402"></a>00402 T m10, |
---|
255 | <a name="l00403"></a>00403 T m20) |
---|
256 | <a name="l00404"></a>00404 { |
---|
257 | <a name="l00405"></a>00405 <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> m(3, 1); |
---|
258 | <a name="l00406"></a>00406 m(0, 0) = m00; |
---|
259 | <a name="l00407"></a>00407 m(1, 0) = m10; |
---|
260 | <a name="l00408"></a>00408 m(2, 0) = m20; |
---|
261 | <a name="l00409"></a>00409 <span class="keywordflow">return</span> m; |
---|
262 | <a name="l00410"></a>00410 } |
---|
263 | <a name="l00411"></a>00411 |
---|
264 | <a name="l00416"></a>00416 <span class="keyword">template</span> <<span class="keyword">class</span> T> |
---|
265 | <a name="l00417"></a><a class="code" href="classitpp_1_1Mat.html#06677d35e1f7772905e8b66e9023258c">00417</a> <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> mat_2x3(T m00, T m01, T m02, |
---|
266 | <a name="l00418"></a>00418 T m10, T m11, T m12) |
---|
267 | <a name="l00419"></a>00419 { |
---|
268 | <a name="l00420"></a>00420 <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> m(2, 3); |
---|
269 | <a name="l00421"></a>00421 m(0, 0) = m00; |
---|
270 | <a name="l00422"></a>00422 m(0, 1) = m01; |
---|
271 | <a name="l00423"></a>00423 m(0, 2) = m02; |
---|
272 | <a name="l00424"></a>00424 m(1, 0) = m10; |
---|
273 | <a name="l00425"></a>00425 m(1, 1) = m11; |
---|
274 | <a name="l00426"></a>00426 m(1, 2) = m12; |
---|
275 | <a name="l00427"></a>00427 <span class="keywordflow">return</span> m; |
---|
276 | <a name="l00428"></a>00428 } |
---|
277 | <a name="l00429"></a>00429 |
---|
278 | <a name="l00434"></a>00434 <span class="keyword">template</span> <<span class="keyword">class</span> T> |
---|
279 | <a name="l00435"></a><a class="code" href="classitpp_1_1Mat.html#3dd8118ba3e1456a24d7c888c76e899a">00435</a> <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> mat_3x2(T m00, T m01, |
---|
280 | <a name="l00436"></a>00436 T m10, T m11, |
---|
281 | <a name="l00437"></a>00437 T m20, T m21) |
---|
282 | <a name="l00438"></a>00438 { |
---|
283 | <a name="l00439"></a>00439 <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> m(3, 2); |
---|
284 | <a name="l00440"></a>00440 m(0, 0) = m00; |
---|
285 | <a name="l00441"></a>00441 m(0, 1) = m01; |
---|
286 | <a name="l00442"></a>00442 m(1, 0) = m10; |
---|
287 | <a name="l00443"></a>00443 m(1, 1) = m11; |
---|
288 | <a name="l00444"></a>00444 m(2, 0) = m20; |
---|
289 | <a name="l00445"></a>00445 m(2, 1) = m21; |
---|
290 | <a name="l00446"></a>00446 <span class="keywordflow">return</span> m; |
---|
291 | <a name="l00447"></a>00447 } |
---|
292 | <a name="l00448"></a>00448 |
---|
293 | <a name="l00453"></a>00453 <span class="keyword">template</span> <<span class="keyword">class</span> T> |
---|
294 | <a name="l00454"></a><a class="code" href="classitpp_1_1Mat.html#3aa6b5a1bc2d9d5e970578917630e78b">00454</a> <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> mat_3x3(T m00, T m01, T m02, |
---|
295 | <a name="l00455"></a>00455 T m10, T m11, T m12, |
---|
296 | <a name="l00456"></a>00456 T m20, T m21, T m22) |
---|
297 | <a name="l00457"></a>00457 { |
---|
298 | <a name="l00458"></a>00458 <a class="code" href="classitpp_1_1Mat.html">Mat<T></a> m(3, 3); |
---|
299 | <a name="l00459"></a>00459 m(0, 0) = m00; |
---|
300 | <a name="l00460"></a>00460 m(0, 1) = m01; |
---|
301 | <a name="l00461"></a>00461 m(0, 2) = m02; |
---|
302 | <a name="l00462"></a>00462 m(1, 0) = m10; |
---|
303 | <a name="l00463"></a>00463 m(1, 1) = m11; |
---|
304 | <a name="l00464"></a>00464 m(1, 2) = m12; |
---|
305 | <a name="l00465"></a>00465 m(2, 0) = m20; |
---|
306 | <a name="l00466"></a>00466 m(2, 1) = m21; |
---|
307 | <a name="l00467"></a>00467 m(2, 2) = m22; |
---|
308 | <a name="l00468"></a>00468 <span class="keywordflow">return</span> m; |
---|
309 | <a name="l00469"></a>00469 } |
---|
310 | <a name="l00470"></a>00470 |
---|
311 | <a name="l00471"></a>00471 } <span class="comment">//namespace itpp</span> |
---|
312 | <a name="l00472"></a>00472 |
---|
313 | <a name="l00473"></a>00473 <span class="preprocessor">#endif // #ifndef SPECMAT_H</span> |
---|
314 | </pre></div></div> |
---|
315 | <hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:02:13 2009 for mixpp by |
---|
316 | <a href="http://www.doxygen.org/index.html"> |
---|
317 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> |
---|
318 | </body> |
---|
319 | </html> |
---|