aboutsummaryrefslogtreecommitdiffstats
path: root/test/matrix_test.cpp
blob: bf85ab35fa23138393e5c186bb68c12f69d716c8 (plain)
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
#include "Math/matrix.hpp"

#include <iostream>

int main()
{
	yage::Matrix<4, 4, int> m1, m2;

	yage::Vector<2, int> v1, v2;

	yage::Vector2d v3;
	
	m1[0][1]=1;
	m2[1][1]=2;

	v1[0]=2;
	v1[1]=3;
	v2[0]=5;
	v2[1]=2;

	v2 += v1+v1;

	v3.x() = 2;
	v3.y() = 1;

	auto m3=yage::matrix::transpose(v3);
	auto vec4=yage::Vector<2, double>(yage::matrix::transpose(m3));

	std::cout<<m2<<'\n';
	std::cout<<v3<<'\n';
	std::cout<<m3<<'\n';
	std::cout<<vec4<<'\n';

	return 0;
}