27 #include <tests/myratest.h> 39 REQUIRE( frobenius(A-B) < tolerance);
48 REQUIRE( equals(expr(A),expr(B)) );
53 ADD_TEST(
"alias_SparseMatrix",
"[sparse]")
55 test1<NumberS>(1.0e-4f);
56 test1<NumberD>(1.0e-8);
57 test1<NumberC>(1.0e-4f);
58 test1<NumberZ>(1.0e-8);
61 ADD_TEST(
"alias_Pattern",
"[sparse]")
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
An interface used to fill containers from Expression's (see Matrix::evaluate(), for example)...
General purpose compressed-sparse-column (CSC) container.
Various utility functions/classes related to scalar Number types.
static Pattern random(int I, int J, int N)
Generates a random Pattern with size IxJ and (approximately) N nonzeros.
Definition: Pattern.cpp:300
Comparison operators (<,>) and logical operators (&&,||,!) for Expression's.
Range/Iterator types associated with Pattern.
Holds the nonzero pattern of a sparse matrix.
Definition: Pattern.h:55
CSparseMatrixRange< Number > top(int i) const
Returns a SparseMatrixRange over the i topmost rows, this(0:i,:)
Definition: SparseMatrix.cpp:361
Reflects Precision trait for a Number, scalar Number types should specialize it.
Definition: Number.h:33
Container class for a sparse nonzero pattern, used in reordering/symbolic analysis.
Returns frobenius norm of a SparseMatrix.
Stores an IxJ matrix A in compressed sparse column format.
Definition: bothcat.h:23
Overloads expr() for SparseMatrix<Number> and Pattern.
Range/Iterator types associated with SparseMatrix.