Source: tests/sparse/bounds_SparseMatrix.cpp 
 
 
   15 #include <tests/myratest.h>    19 ADD_TEST(
"bounds_SparseMatrix",
"[sparse]")
    24   REQUIRE_EXCEPTION( 
auto a = A.at(3,0); );
    25   REQUIRE_EXCEPTION( 
auto a = A.at(0,3); );
    26   REQUIRE_EXCEPTION( 
auto a = A.at(-1,0); );
    27   REQUIRE_EXCEPTION( 
auto a = A.at(0,-1); );
    29   REQUIRE_EXCEPTION( 
auto a = A.rows(0,4); );
    30   REQUIRE_EXCEPTION( 
auto a = A.rows(4,7); );
    31   REQUIRE_EXCEPTION( 
auto a = A.rows(-1,1); );
    32   REQUIRE_EXCEPTION( 
auto a = A.rows(2,-1); );
    33   REQUIRE_EXCEPTION( 
auto a = A.rows(2,1); );
    35   REQUIRE_EXCEPTION( 
auto a = A.columns(0,4); );
    36   REQUIRE_EXCEPTION( 
auto a = A.columns(4,7); );
    37   REQUIRE_EXCEPTION( 
auto a = A.columns(-1,1); );
    38   REQUIRE_EXCEPTION( 
auto a = A.columns(2,-1); );
    39   REQUIRE_EXCEPTION( 
auto a = A.columns(2,1); );
    42   REQUIRE_EXCEPTION( 
auto i = I.at(0,1); );
    45   REQUIRE_EXCEPTION( 
bool flag = A.begin() == B.begin(); );
 static SparseMatrix< Number > random(int I, int J, int N)
Generates a random SparseMatrix with size IxJ and (approximately) N nonzeros. 
Definition: SparseMatrix.cpp:493
General purpose compressed-sparse-column (CSC) container. 
static SparseMatrix< Number > identity(int IJ)
Generates an identity SparseMatrix of specified size. 
Definition: SparseMatrix.cpp:481
 
 Results:  [PASS] 
 
 
 
 Go back to Summary of /test programs.