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 enumWhat kind of numbers are storedstatic enumSymmetry 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 TypeMethodDescriptionbooleanisArray()Returnstrueif the matrix is in array format, elsefalsebooleanReturnstrueif the matrix stores complex numbers, elsefalsebooleanReturnstrueif the matrix is in coordinate format, elsefalsebooleanisDense()Returnstrueif the matrix is in array format, elsefalsebooleanReturnstrueif the matrix form is general, elsefalsebooleanReturnstrueif the matrix is Hermitian, elsefalsebooleanReturnstrueif the matrix stores integers, elsefalsebooleanReturnstrueif the matrix does not store any numbers, elsefalsebooleanisReal()Returnstrueif the matrix stores real numbers, elsefalsebooleanReturnstrueif the matrix is skew-symmetrical, elsefalsebooleanisSparse()Returnstrueif the matrix is in coordinate format, elsefalsebooleanReturnstrueif the matrix is symmetrical, elsefalsetoString()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()Returnstrueif the matrix is in coordinate format, elsefalse -
isCoordinate
public boolean isCoordinate()Returnstrueif the matrix is in coordinate format, elsefalse -
isDense
public boolean isDense()Returnstrueif the matrix is in array format, elsefalse -
isArray
public boolean isArray()Returnstrueif the matrix is in array format, elsefalse -
isReal
public boolean isReal()Returnstrueif the matrix stores real numbers, elsefalse -
isInteger
public boolean isInteger()Returnstrueif the matrix stores integers, elsefalse -
isComplex
public boolean isComplex()Returnstrueif the matrix stores complex numbers, elsefalse -
isPattern
public boolean isPattern()Returnstrueif the matrix does not store any numbers, elsefalse -
isGeneral
public boolean isGeneral()Returnstrueif the matrix form is general, elsefalse -
isSymmetric
public boolean isSymmetric()Returnstrueif the matrix is symmetrical, elsefalse -
isSkewSymmetric
public boolean isSkewSymmetric()Returnstrueif the matrix is skew-symmetrical, elsefalse -
isHermitian
public boolean isHermitian()Returnstrueif 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
-