mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
release of tvmet (inactive for 2 years and developer unreachable) as the basis for eigen2, because it provides seemingly good expression template mechanisms, we want that, and it would take years to reinvent that wheel. We'll see. So this commit imports the last tvmet release.
22 lines
415 B
C++
22 lines
415 B
C++
#include <iostream>
|
|
#include <tvmet/Matrix.h>
|
|
|
|
using namespace std;
|
|
using namespace tvmet;
|
|
|
|
int main() {
|
|
// Matrix stuff II (unary functions)
|
|
Matrix<double,3,3> m1, m2, m3;
|
|
m1 = 1,2,3,
|
|
4,5,6,
|
|
7,8,9;
|
|
m2 = trans(m1);
|
|
|
|
cout << "Xpr Level printing of "
|
|
<< "sqrt(\n" << m1 <<"):\n";
|
|
cout << sqrt(m1) << endl;
|
|
cout << "The result = \n";
|
|
m3 = sqrt(m1);
|
|
cout << m3 << endl << endl;
|
|
}
|