aboutsummaryrefslogtreecommitdiffhomepage
path: root/tvmet-1.7.1/examples/xpr_print_m2.cc
blob: c9151fdc3b997e2c171e760de078aa597ae96a64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#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;
}