-
Notifications
You must be signed in to change notification settings - Fork 3
/
Matrix.cc
59 lines (52 loc) · 1.25 KB
/
Matrix.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#include "Matrix.h"
void dumpMatrix(SMatrix33& m){
for (unsigned int r=0;r<3;++r) {
for (unsigned int c=0;c<3;++c) {
std::cout << m.At(r,c) << " ";
}
std::cout << std::endl;
}
}
void dumpMatrix(SMatrixSym33& m){
for (unsigned int r=0;r<3;++r) {
for (unsigned int c=0;c<3;++c) {
std::cout << m.At(r,c) << " ";
}
std::cout << std::endl;
}
}
void dumpMatrix(SMatrix36& m){
for (unsigned int r=0;r<3;++r) {
for (unsigned int c=0;c<6;++c) {
std::cout << m.At(r,c) << " ";
}
std::cout << std::endl;
}
}
void dumpMatrix(SMatrix63& m){
for (unsigned int r=0;r<6;++r) {
for (unsigned int c=0;c<3;++c) {
std::cout << m.At(r,c) << " ";
}
std::cout << std::endl;
}
}
void dumpMatrix(SMatrix66& m){
for (unsigned int r=0;r<6;++r) {
for (unsigned int c=0;c<6;++c) {
std::cout << m.At(r,c) << " ";
}
std::cout << std::endl;
}
}
void dumpMatrix(SMatrixSym66& m){
for (unsigned int r=0;r<6;++r) {
for (unsigned int c=0;c<6;++c) {
std::cout << m.At(r,c) << " ";
}
std::cout << std::endl;
}
}
std::default_random_engine g_gen(0xbeef0133);
std::normal_distribution<float> g_gaus(0.0, 1.0);
std::uniform_real_distribution<float> g_unif(0.0, 1.0);