diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2017-06-08 10:12:20 +0100 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2017-06-08 10:12:20 +0100 |
commit | f26f97b06aa071009dcb11f618d5f9d03c201156 (patch) | |
tree | 9fe2e25fee92ed89caf3c9fd27a8085364b75d22 /test/matrix_test.cpp | |
parent | d259d97d283bdf1d3b3d15916073c283ca2283e7 (diff) | |
download | YAGE-f26f97b06aa071009dcb11f618d5f9d03c201156.tar.gz YAGE-f26f97b06aa071009dcb11f618d5f9d03c201156.zip |
Continuing the matrix class
Diffstat (limited to 'test/matrix_test.cpp')
-rw-r--r-- | test/matrix_test.cpp | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/test/matrix_test.cpp b/test/matrix_test.cpp index e975794f..a6974c7f 100644 --- a/test/matrix_test.cpp +++ b/test/matrix_test.cpp @@ -4,14 +4,29 @@ int main() { - yage::Matrix<4, 4> matrix; + yage::Matrix<4, 4, int> m1, m2; - double x=matrix[2][2]; - matrix[2][2]=4; + yage::Vector<2, int> v1, v2; - std::cout<<"at: "<<x<<", "<<matrix[2][2]<<'\n'; + yage::Vector2d v3; - if(matrix[2][2]==4 && x==0) - return 0; - return 1; + 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; + + yage::matrix::multiply(m1, m2); + + std::cout<<m2<<'\n'; + std::cout<<v3<<'\n'; + + return 0; } |