Package no.uib.cipr.matrix.io
Class MatrixInfo
- java.lang.Object
-
- no.uib.cipr.matrix.io.MatrixInfo
-
public class MatrixInfo extends java.lang.Object
Contains information on a matrix in the Matrix Market exchange format. Supports all valid matrices.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MatrixInfo.MatrixField
What kind of numbers are storedstatic class
MatrixInfo.MatrixSymmetry
Symmetry structure of the matrix, if any
-
Constructor Summary
Constructors Constructor Description MatrixInfo(boolean sparse, MatrixInfo.MatrixField field, MatrixInfo.MatrixSymmetry symmetry)
Creates a specific type
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isArray()
Returnstrue
if the matrix is in array format, elsefalse
boolean
isComplex()
Returnstrue
if the matrix stores complex numbers, elsefalse
boolean
isCoordinate()
Returnstrue
if the matrix is in coordinate format, elsefalse
boolean
isDense()
Returnstrue
if the matrix is in array format, elsefalse
boolean
isGeneral()
Returnstrue
if the matrix form is general, elsefalse
boolean
isHermitian()
Returnstrue
if the matrix is Hermitian, elsefalse
boolean
isInteger()
Returnstrue
if the matrix stores integers, elsefalse
boolean
isPattern()
Returnstrue
if the matrix does not store any numbers, elsefalse
boolean
isReal()
Returnstrue
if the matrix stores real numbers, elsefalse
boolean
isSkewSymmetric()
Returnstrue
if the matrix is skew-symmetrical, elsefalse
boolean
isSparse()
Returnstrue
if the matrix is in coordinate format, elsefalse
boolean
isSymmetric()
Returnstrue
if the matrix is symmetrical, elsefalse
java.lang.String
toString()
Returns a string representation of the specifier.
-
-
-
Constructor Detail
-
MatrixInfo
public MatrixInfo(boolean sparse, MatrixInfo.MatrixField field, MatrixInfo.MatrixSymmetry symmetry)
Creates a specific type- Parameters:
sparse
- True for sparse matrices, else falsefield
- Type of data storedsymmetry
- Matrix symmetry
-
-
Method Detail
-
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
public java.lang.String 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
- Overrides:
toString
in classjava.lang.Object
-
-