Package no.uib.cipr.matrix.io
Class MatrixInfo
java.lang.Object
no.uib.cipr.matrix.io.MatrixInfo
Contains information on a matrix in the Matrix Market exchange format.
Supports all valid matrices.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
What kind of numbers are storedstatic enum
Symmetry structure of the matrix, if any -
Constructor Summary
ConstructorsConstructorDescriptionMatrixInfo
(boolean sparse, MatrixInfo.MatrixField field, MatrixInfo.MatrixSymmetry symmetry) Creates a specific type -
Method Summary
Modifier and TypeMethodDescriptionboolean
isArray()
Returnstrue
if the matrix is in array format, elsefalse
boolean
Returnstrue
if the matrix stores complex numbers, elsefalse
boolean
Returnstrue
if the matrix is in coordinate format, elsefalse
boolean
isDense()
Returnstrue
if the matrix is in array format, elsefalse
boolean
Returnstrue
if the matrix form is general, elsefalse
boolean
Returnstrue
if the matrix is Hermitian, elsefalse
boolean
Returnstrue
if the matrix stores integers, elsefalse
boolean
Returnstrue
if the matrix does not store any numbers, elsefalse
boolean
isReal()
Returnstrue
if the matrix stores real numbers, elsefalse
boolean
Returnstrue
if the matrix is skew-symmetrical, elsefalse
boolean
isSparse()
Returnstrue
if the matrix is in coordinate format, elsefalse
boolean
Returnstrue
if the matrix is symmetrical, elsefalse
toString()
Returns a string representation of the specifier.
-
Constructor Details
-
MatrixInfo
Creates a specific type- Parameters:
sparse
- True for sparse matrices, else falsefield
- Type of data storedsymmetry
- Matrix symmetry
-
-
Method Details
-
isSparse
public boolean isSparse()Returnstrue
if the matrix is in coordinate format, elsefalse
-
isCoordinate
public boolean isCoordinate()Returnstrue
if the matrix is in coordinate format, elsefalse
-
isDense
public boolean isDense()Returnstrue
if the matrix is in array format, elsefalse
-
isArray
public boolean isArray()Returnstrue
if the matrix is in array format, elsefalse
-
isReal
public boolean isReal()Returnstrue
if the matrix stores real numbers, elsefalse
-
isInteger
public boolean isInteger()Returnstrue
if the matrix stores integers, elsefalse
-
isComplex
public boolean isComplex()Returnstrue
if the matrix stores complex numbers, elsefalse
-
isPattern
public boolean isPattern()Returnstrue
if the matrix does not store any numbers, elsefalse
-
isGeneral
public boolean isGeneral()Returnstrue
if the matrix form is general, elsefalse
-
isSymmetric
public boolean isSymmetric()Returnstrue
if the matrix is symmetrical, elsefalse
-
isSkewSymmetric
public boolean isSkewSymmetric()Returnstrue
if the matrix is skew-symmetrical, elsefalse
-
isHermitian
public boolean isHermitian()Returnstrue
if the matrix is Hermitian, elsefalse
-
toString
Returns a string representation of the specifier. Can be used to provide a header for writing to a file. It is a two-line output, which can look like this:%%MatrixMarket matrix coordinate real general
-