Simbody  3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SmallMatrix.h
Go to the documentation of this file.
1 #ifndef SimTK_SIMMATRIX_SMALLMATRIX_H_
2 #define SimTK_SIMMATRIX_SMALLMATRIX_H_
3 
4 /* -------------------------------------------------------------------------- *
5  * Simbody(tm): SimTKcommon *
6  * -------------------------------------------------------------------------- *
7  * This is part of the SimTK biosimulation toolkit originating from *
8  * Simbios, the NIH National Center for Physics-Based Simulation of *
9  * Biological Structures at Stanford, funded under the NIH Roadmap for *
10  * Medical Research, grant U54 GM072970. See https://simtk.org/home/simbody. *
11  * *
12  * Portions copyright (c) 2005-12 Stanford University and the Authors. *
13  * Authors: Michael Sherman *
14  * Contributors: *
15  * *
16  * Licensed under the Apache License, Version 2.0 (the "License"); you may *
17  * not use this file except in compliance with the License. You may obtain a *
18  * copy of the License at http://www.apache.org/licenses/LICENSE-2.0. *
19  * *
20  * Unless required by applicable law or agreed to in writing, software *
21  * distributed under the License is distributed on an "AS IS" BASIS, *
22  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
23  * See the License for the specific language governing permissions and *
24  * limitations under the License. *
25  * -------------------------------------------------------------------------- */
26 
88 #include "SimTKcommon/Scalar.h"
90 
91 
92 #include "SimTKcommon/internal/ResultType.h"
98 
99 // Friendly abbreviations.
100 namespace SimTK {
101 
102 typedef Vec<1> Vec1; // just a scalar
103 typedef Vec<2> Vec2;
104 typedef Vec<3> Vec3;
105 typedef Vec<4> Vec4;
106 typedef Vec<5> Vec5;
107 typedef Vec<6> Vec6;
108 typedef Vec<7> Vec7;
109 typedef Vec<8> Vec8;
110 typedef Vec<9> Vec9;
111 
112 typedef Vec<1,float> fVec1; // just a scalar
121 
122 typedef Row<1> Row1; // just a scalar
123 typedef Row<2> Row2;
124 typedef Row<3> Row3;
125 typedef Row<4> Row4;
126 typedef Row<5> Row5;
127 typedef Row<6> Row6;
128 typedef Row<7> Row7;
129 typedef Row<8> Row8;
130 typedef Row<9> Row9;
131 
132 typedef Row<1,float> fRow1; // just a scalar
141 
142 typedef SymMat<1> SymMat11; // just a scalar
151 
152 typedef SymMat<1,float> fSymMat11; // just a scalar
161 
162 typedef Mat<1,1> Mat11; // This is just a scalar
163 typedef Mat<1,2> Mat12; // The rest here are just single Rows
164 typedef Mat<1,3> Mat13;
165 typedef Mat<1,4> Mat14;
166 typedef Mat<1,5> Mat15;
167 typedef Mat<1,6> Mat16;
168 typedef Mat<1,7> Mat17;
169 typedef Mat<1,8> Mat18;
170 typedef Mat<1,9> Mat19;
171 
172 typedef Mat<2,1> Mat21; // Mats with 2 rows
173 typedef Mat<2,2> Mat22;
174 typedef Mat<2,3> Mat23;
175 typedef Mat<2,4> Mat24;
176 typedef Mat<2,5> Mat25;
177 typedef Mat<2,6> Mat26;
178 typedef Mat<2,7> Mat27;
179 typedef Mat<2,8> Mat28;
180 typedef Mat<2,9> Mat29;
181 
182 typedef Mat<3,1> Mat31; // Mats with 3 rows
183 typedef Mat<3,2> Mat32;
184 typedef Mat<3,3> Mat33;
185 typedef Mat<3,4> Mat34;
186 typedef Mat<3,5> Mat35;
187 typedef Mat<3,6> Mat36;
188 typedef Mat<3,7> Mat37;
189 typedef Mat<3,8> Mat38;
190 typedef Mat<3,9> Mat39;
191 
192 typedef Mat<4,1> Mat41; // Mats with 4 rows
193 typedef Mat<4,2> Mat42;
194 typedef Mat<4,3> Mat43;
195 typedef Mat<4,4> Mat44;
196 typedef Mat<4,5> Mat45;
197 typedef Mat<4,6> Mat46;
198 typedef Mat<4,7> Mat47;
199 typedef Mat<4,8> Mat48;
200 typedef Mat<4,9> Mat49;
201 
202 typedef Mat<5,1> Mat51; // Mats with 5 rows
203 typedef Mat<5,2> Mat52;
204 typedef Mat<5,3> Mat53;
205 typedef Mat<5,4> Mat54;
206 typedef Mat<5,5> Mat55;
207 typedef Mat<5,6> Mat56;
208 typedef Mat<5,7> Mat57;
209 typedef Mat<5,8> Mat58;
210 typedef Mat<5,9> Mat59;
211 
212 typedef Mat<6,1> Mat61; // Mats with 6 rows
213 typedef Mat<6,2> Mat62;
214 typedef Mat<6,3> Mat63;
215 typedef Mat<6,4> Mat64;
216 typedef Mat<6,5> Mat65;
217 typedef Mat<6,6> Mat66;
218 typedef Mat<6,7> Mat67;
219 typedef Mat<6,8> Mat68;
220 typedef Mat<6,9> Mat69;
221 
222 typedef Mat<7,1> Mat71; // Mats with 7 rows
223 typedef Mat<7,2> Mat72;
224 typedef Mat<7,3> Mat73;
225 typedef Mat<7,4> Mat74;
226 typedef Mat<7,5> Mat75;
227 typedef Mat<7,6> Mat76;
228 typedef Mat<7,7> Mat77;
229 typedef Mat<7,8> Mat78;
230 typedef Mat<7,9> Mat79;
231 
232 typedef Mat<8,1> Mat81; // Mats with 8 rows
233 typedef Mat<8,2> Mat82;
234 typedef Mat<8,3> Mat83;
235 typedef Mat<8,4> Mat84;
236 typedef Mat<8,5> Mat85;
237 typedef Mat<8,6> Mat86;
238 typedef Mat<8,7> Mat87;
239 typedef Mat<8,8> Mat88;
240 typedef Mat<8,9> Mat89;
241 
242 typedef Mat<9,1> Mat91; // Mats with 9 rows
243 typedef Mat<9,2> Mat92;
244 typedef Mat<9,3> Mat93;
245 typedef Mat<9,4> Mat94;
246 typedef Mat<9,5> Mat95;
247 typedef Mat<9,6> Mat96;
248 typedef Mat<9,7> Mat97;
249 typedef Mat<9,8> Mat98;
250 typedef Mat<9,9> Mat99;
251 
252 // Just doing some of the popular ones for now.
264 
265 
266 } //namespace SimTK
267 
268 
269 #endif //SimTK_SIMMATRIX_SMALLMATRIX_H_
Vec< 4 > Vec4
Definition: SmallMatrix.h:105
Mat< 9, 4 > Mat94
Definition: SmallMatrix.h:245
Row< 3 > Row3
Definition: SmallMatrix.h:124
Mat< 6, 6, float > fMat66
Definition: SmallMatrix.h:260
Mat< 6, 5 > Mat65
Definition: SmallMatrix.h:216
Mat< 8, 8 > Mat88
Definition: SmallMatrix.h:239
Vec< 5, float > fVec5
Definition: SmallMatrix.h:116
Mat< 8, 6 > Mat86
Definition: SmallMatrix.h:237
Mat< 9, 7 > Mat97
Definition: SmallMatrix.h:248
Mat< 1, 6 > Mat16
Definition: SmallMatrix.h:167
RS is total spacing between rows in memory (default 1)
Definition: SymMat.h:71
Mat< 9, 9, float > fMat99
Definition: SmallMatrix.h:263
Mat< 5, 1 > Mat51
Definition: SmallMatrix.h:202
Mat< 7, 8 > Mat78
Definition: SmallMatrix.h:229
SymMat< 5, float > fSymMat55
Definition: SmallMatrix.h:156
Vec< 4, float > fVec4
Definition: SmallMatrix.h:115
Mat< 3, 4 > Mat34
Definition: SmallMatrix.h:185
Mat< 2, 1 > Mat21
Definition: SmallMatrix.h:172
Vec< 8, float > fVec8
Definition: SmallMatrix.h:119
Vec< 9 > Vec9
Definition: SmallMatrix.h:110
Mat< 9, 6 > Mat96
Definition: SmallMatrix.h:247
Mat< 2, 2 > Mat22
Definition: SmallMatrix.h:173
Mat< 2, 2, float > fMat22
Definition: SmallMatrix.h:254
Mat< 2, 6 > Mat26
Definition: SmallMatrix.h:177
Mat< 3, 4, float > fMat34
Definition: SmallMatrix.h:256
Mat< 5, 3 > Mat53
Definition: SmallMatrix.h:204
Vec< 1 > Vec1
Definition: SmallMatrix.h:102
This file declares class Row<NCOLS, ELEMENT_TYPE, STRIDE>.
Mat< 2, 4 > Mat24
Definition: SmallMatrix.h:175
Mat< 3, 9 > Mat39
Definition: SmallMatrix.h:190
Mat< 3, 7 > Mat37
Definition: SmallMatrix.h:188
Row< 5 > Row5
Definition: SmallMatrix.h:126
Row< 3, float > fRow3
Definition: SmallMatrix.h:134
Mat< 7, 4 > Mat74
Definition: SmallMatrix.h:225
Mat< 2, 8 > Mat28
Definition: SmallMatrix.h:179
SymMat< 4, float > fSymMat44
Definition: SmallMatrix.h:155
SymMat< 9, float > fSymMat99
Definition: SmallMatrix.h:160
SymMat< 3, float > fSymMat33
Definition: SmallMatrix.h:154
Mat< 2, 3 > Mat23
Definition: SmallMatrix.h:174
Row< 7 > Row7
Definition: SmallMatrix.h:128
Mat< 6, 2 > Mat62
Definition: SmallMatrix.h:213
Mat< 4, 3, float > fMat43
Definition: SmallMatrix.h:257
SymMat< 1, float > fSymMat11
Definition: SmallMatrix.h:152
Row< 2 > Row2
Definition: SmallMatrix.h:123
Vec< 2 > Vec2
Definition: SmallMatrix.h:103
Vec< 6, float > fVec6
Definition: SmallMatrix.h:117
Mat< 3, 2 > Mat32
Definition: SmallMatrix.h:183
Mat< 8, 5 > Mat85
Definition: SmallMatrix.h:236
SymMat< 1 > SymMat11
Definition: SmallMatrix.h:142
Mat< 8, 1 > Mat81
Definition: SmallMatrix.h:232
Mat< 5, 7 > Mat57
Definition: SmallMatrix.h:208
SymMat< 6, float > fSymMat66
Definition: SmallMatrix.h:157
Vec< 6 > Vec6
Definition: SmallMatrix.h:107
Row< 8, float > fRow8
Definition: SmallMatrix.h:139
Mat< 8, 2 > Mat82
Definition: SmallMatrix.h:233
Row< 1, float > fRow1
Definition: SmallMatrix.h:132
Declaration of class Vec<NROWS, ELEMENT_TYPE, STRIDE>.
Row< 9 > Row9
Definition: SmallMatrix.h:130
Vec< 3, float > fVec3
Definition: SmallMatrix.h:114
Mat< 6, 3 > Mat63
Definition: SmallMatrix.h:214
Mat< 3, 3 > Mat33
Definition: SmallMatrix.h:184
Vec< 7, float > fVec7
Definition: SmallMatrix.h:118
SymMat< 9 > SymMat99
Definition: SmallMatrix.h:150
Row< 5, float > fRow5
Definition: SmallMatrix.h:136
Mat< 7, 7 > Mat77
Definition: SmallMatrix.h:228
This is a fixed length column vector designed for no-overhead inline computation. ...
Definition: Vec.h:131
Row< 6 > Row6
Definition: SmallMatrix.h:127
Row< 4 > Row4
Definition: SmallMatrix.h:125
Mat< 5, 5, float > fMat55
Definition: SmallMatrix.h:259
Mat< 6, 7 > Mat67
Definition: SmallMatrix.h:218
Row< 7, float > fRow7
Definition: SmallMatrix.h:138
Vec< 1, float > fVec1
Definition: SmallMatrix.h:112
Mat< 5, 5 > Mat55
Definition: SmallMatrix.h:206
Mat< 1, 7 > Mat17
Definition: SmallMatrix.h:168
Mat< 9, 5 > Mat95
Definition: SmallMatrix.h:246
Mat< 9, 1 > Mat91
Definition: SmallMatrix.h:242
Mat< 5, 8 > Mat58
Definition: SmallMatrix.h:209
Mat< 9, 9 > Mat99
Definition: SmallMatrix.h:250
Mat< 1, 1 > Mat11
Definition: SmallMatrix.h:162
These is a templatized, C++ callable interface to LAPACK and BLAS.
This is a user-includable header which includes everything needed to make use of SimMatrix Scalar cod...
SymMat< 3 > SymMat33
Definition: SmallMatrix.h:144
Mat< 5, 2 > Mat52
Definition: SmallMatrix.h:203
Row< 1 > Row1
Definition: SmallMatrix.h:122
Row< 6, float > fRow6
Definition: SmallMatrix.h:137
Mat< 4, 6 > Mat46
Definition: SmallMatrix.h:197
SymMat< 4 > SymMat44
Definition: SmallMatrix.h:145
Mat< 7, 2 > Mat72
Definition: SmallMatrix.h:223
Mat< 1, 1, float > fMat11
Definition: SmallMatrix.h:253
Mat< 2, 5 > Mat25
Definition: SmallMatrix.h:176
Mat< 3, 8 > Mat38
Definition: SmallMatrix.h:189
This file declares class SymMat<M, ELEMENT_TYPE, ROW_SPACING>.
Mat< 1, 5 > Mat15
Definition: SmallMatrix.h:166
Mat< 7, 7, float > fMat77
Definition: SmallMatrix.h:261
Vec< 5 > Vec5
Definition: SmallMatrix.h:106
Vec< 7 > Vec7
Definition: SmallMatrix.h:108
Mat< 3, 6 > Mat36
Definition: SmallMatrix.h:187
SymMat< 2, float > fSymMat22
Definition: SmallMatrix.h:153
Row< 4, float > fRow4
Definition: SmallMatrix.h:135
Mat< 7, 5 > Mat75
Definition: SmallMatrix.h:226
Mat< 3, 3, float > fMat33
Definition: SmallMatrix.h:255
Mat< 4, 8 > Mat48
Definition: SmallMatrix.h:199
Mat< 6, 4 > Mat64
Definition: SmallMatrix.h:215
Mat< 6, 6 > Mat66
Definition: SmallMatrix.h:217
Mat< 4, 4, float > fMat44
Definition: SmallMatrix.h:258
Mat< 2, 7 > Mat27
Definition: SmallMatrix.h:178
Mat< 5, 4 > Mat54
Definition: SmallMatrix.h:205
Mat< 4, 3 > Mat43
Definition: SmallMatrix.h:194
Generic Row.
Definition: Row.h:118
Mat< 6, 9 > Mat69
Definition: SmallMatrix.h:220
This file defines global functions and class members which use a mix of Vec, Row, and Mat types and h...
SymMat< 8, float > fSymMat88
Definition: SmallMatrix.h:159
Mat< 4, 4 > Mat44
Definition: SmallMatrix.h:195
Mat< 1, 2 > Mat12
Definition: SmallMatrix.h:163
Mat< 7, 1 > Mat71
Definition: SmallMatrix.h:222
SymMat< 6 > SymMat66
Definition: SmallMatrix.h:147
Mat< 4, 7 > Mat47
Definition: SmallMatrix.h:198
Vec< 3 > Vec3
Definition: SmallMatrix.h:104
SymMat< 2 > SymMat22
Definition: SmallMatrix.h:143
Mat< 9, 2 > Mat92
Definition: SmallMatrix.h:243
Mat< 9, 3 > Mat93
Definition: SmallMatrix.h:244
Mat< 8, 3 > Mat83
Definition: SmallMatrix.h:234
Mat< 4, 9 > Mat49
Definition: SmallMatrix.h:200
Mat< 8, 7 > Mat87
Definition: SmallMatrix.h:238
Vec< 2, float > fVec2
Definition: SmallMatrix.h:113
This class represents a small matrix whose size is known at compile time, containing elements of any ...
Definition: Mat.h:51
Mat< 3, 5 > Mat35
Definition: SmallMatrix.h:186
Mat< 7, 6 > Mat76
Definition: SmallMatrix.h:227
Row< 8 > Row8
Definition: SmallMatrix.h:129
Mat< 4, 2 > Mat42
Definition: SmallMatrix.h:193
Mat< 4, 1 > Mat41
Definition: SmallMatrix.h:192
Mat< 1, 4 > Mat14
Definition: SmallMatrix.h:165
Mat< 6, 1 > Mat61
Definition: SmallMatrix.h:212
Vec< 8 > Vec8
Definition: SmallMatrix.h:109
SymMat< 7 > SymMat77
Definition: SmallMatrix.h:148
Mat< 5, 6 > Mat56
Definition: SmallMatrix.h:207
Row< 2, float > fRow2
Definition: SmallMatrix.h:133
Mat< 6, 8 > Mat68
Definition: SmallMatrix.h:219
Row< 9, float > fRow9
Definition: SmallMatrix.h:140
Mat< 7, 3 > Mat73
Definition: SmallMatrix.h:224
Mat< 5, 9 > Mat59
Definition: SmallMatrix.h:210
Mat< 8, 8, float > fMat88
Definition: SmallMatrix.h:262
Mat< 1, 3 > Mat13
Definition: SmallMatrix.h:164
This file declares class Mat<NROWS, NCOLS, ELEMENT_TYPE, COL_SPACING, ROW_SPACING>.
SymMat< 8 > SymMat88
Definition: SmallMatrix.h:149
Mat< 1, 8 > Mat18
Definition: SmallMatrix.h:169
Mat< 9, 8 > Mat98
Definition: SmallMatrix.h:249
SymMat< 5 > SymMat55
Definition: SmallMatrix.h:146
Mat< 7, 9 > Mat79
Definition: SmallMatrix.h:230
Mat< 8, 4 > Mat84
Definition: SmallMatrix.h:235
Vec< 9, float > fVec9
Definition: SmallMatrix.h:120
Mat< 8, 9 > Mat89
Definition: SmallMatrix.h:240
Mat< 3, 1 > Mat31
Definition: SmallMatrix.h:182
SymMat< 7, float > fSymMat77
Definition: SmallMatrix.h:158
Mat< 1, 9 > Mat19
Definition: SmallMatrix.h:170
Mat< 4, 5 > Mat45
Definition: SmallMatrix.h:196
Mat< 2, 9 > Mat29
Definition: SmallMatrix.h:180