Subversion Repositories gelsvn

Rev

Rev 194 | Rev 343 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 194 Rev 326
Line 1... Line 1...
1
#include <iostream>
1
#include <iostream>
-
 
2
#include <algorithm>
2
 
3
 
-
 
4
#include "CGLA/Mat4x4d.h"
3
#include "CGLA/Mat4x4f.h"
5
#include "CGLA/Mat4x4f.h"
4
#include "CGLA/Mat2x2f.h"
6
#include "CGLA/Mat2x2f.h"
5
#include "CGLA/Mat3x3f.h"
7
#include "CGLA/Mat3x3f.h"
6
#include "CGLA/Mat2x3f.h"
8
#include "CGLA/Mat2x3f.h"
7
#include "CGLA/eigensolution.h"
9
#include "CGLA/eigensolution.h"
Line 113... Line 115...
113
 
115
 
114
	copy_matrix(m33, m44);
116
	copy_matrix(m33, m44);
115
 
117
 
116
	cout << "The matrix " << m33 << " is copied to " << m44 << endl;
118
	cout << "The matrix " << m33 << " is copied to " << m44 << endl;
117
 
119
 
-
 
120
	cout << "Determinant of singular 4x4 matrix" << endl;
118
 
121
 
-
 
122
 	Mat4x4d m_odd(Vec4d(0, 373, 139129, 1),
-
 
123
 								Vec4d(-373, -125, 154754, 1),
-
 
124
 								Vec4d(-50.6168, 21.2469, 3013.5, 100),
-
 
125
 								Vec4d(-50.6168, 21.2469, 3013.5, 100));
-
 
126
 
-
 
127
	cout << m_odd << endl;
-
 
128
	cout << "Determinant: " << determinant(m_odd) << endl;
-
 
129
 
-
 
130
	Mat4x4d m_odd_t = transpose(m_odd);
-
 
131
 
-
 
132
	cout << m_odd_t << endl;
-
 
133
	cout << "Det of transpose:" << determinant(m_odd_t) << endl;
-
 
134
 
-
 
135
	cout << "Determinant of random matrix (MatLab says 0.0491)" << endl;
-
 
136
	
-
 
137
 
-
 
138
	Mat4x4d Mrand(Vec4d(0.9169,0.3529,0.2028,0.1988),
-
 
139
								Vec4d(0.4103,0.8132,0.1987,0.0153),
-
 
140
								Vec4d(0.8936,0.0099,0.6038,0.7468),
-
 
141
								Vec4d(0.0579,0.1389,0.2722,0.4451));
-
 
142
	
-
 
143
	cout << "det " << determinant(Mrand) << endl;
-
 
144
	cout << "det of transpose " << determinant(transpose(Mrand)) << endl;
-
 
145
	
119
	return 0;
146
	return 0;
120
}
147
}