45 using namespace matrix;
51 std::cout <<
"\n -[ Creation and Access ]-\n";
53 double testdata[9]={1,0,0, 0,1,0, 0,0,1};
55 unit_assert(
"identity_set=id",
56 M1[0] == 1 && M1[1] == 0 && M1[2] == 0 &&
57 M1[3] == 0 && M1[4] == 1 && M1[5] == 0 &&
58 M1[6] == 0 && M1[8] == 0 && M1[9] == 1);
59 double testdata2[12]={1,2,3, 4,5,6, 7,8,9, 10,11,12};
62 unit_assert(
"dimension of matrix", M3.getM() == 4 && M3.getN() == 3 );
63 unit_assert(
"field check",
64 M3.val(0,2) == 3 && M3.val(2,1) == 8 && M3.val(3,0) == 10 );
69 UNIT_TEST_RUN(
"SparseMatrix Tests" )
70 ADD_TEST( check_creation )
UNIT_TEST_DEFINES DEFINE_TEST(CheckSetGet)
Definition: configurabletest.cpp:51
sparse matrix which uses an HashTable first (fast implemented) version
Definition: sparsematrix.h:37