#ifndef __SW_TEST_MATRIX_H__ #define __SW_TEST_MATRIX_H__ /* This will test functions from file.h and file.cpp. */ // uncomment to disable assert() // #define NDEBUG #include #include "matrix.h" //namespace SW { int testMatrix() { SW::Matrix mat1(10, 10, 1.0); SW::Matrix mat2(10, 10, 2.0); SW::Matrix mat3 = mat1 + mat2; // Matrix M = (Matrix_(3, 3) << 1, 0, 0, 0, 1, 0, 0, 0, 1); //SW::Matrix mat3(3, 3); //mat3 << 1, 0, 0, 0, 1, 0, 0, 0, 1; //mat3 = 1, 0, 0, 0, 1, 0, 0, 0, 1; //mat3 = mat2; mat3.print(); /* for (int i = 0; i mat4(3, 3, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0); //mat4.print(); return 0; } //} // end namespace SW #endif