Package no.uib.cipr.matrix.io
Class VectorInfo
java.lang.Object
no.uib.cipr.matrix.io.VectorInfo
Contains information on a vector in a variant of the Matrix Market exchange format
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
What kind of numbers are stored -
Constructor Summary
ConstructorsConstructorDescriptionVectorInfo
(boolean sparse, VectorInfo.VectorField field) Creates a specific type -
Method Summary
Modifier and TypeMethodDescriptionboolean
isArray()
Returnstrue
if the vector is in array format, elsefalse
boolean
Returnstrue
if the vector stores complex numbers, elsefalse
boolean
Returnstrue
if the vector is in coordinate format, elsefalse
boolean
isDense()
Returnstrue
if the vector is in array format, elsefalse
boolean
Returnstrue
if the vector stores integers, elsefalse
boolean
Returnstrue
if the vector does not store any numbers, elsefalse
boolean
isReal()
Returnstrue
if the vector stores real numbers, elsefalse
boolean
isSparse()
Returnstrue
if the vector is in coordinate format, elsefalse
toString()
Returns a string representation of the specifier.
-
Constructor Details
-
VectorInfo
Creates a specific type- Parameters:
sparse
- True for sparse vectors, else falsefield
- Type of data stored
-
-
Method Details
-
isSparse
public boolean isSparse()Returnstrue
if the vector is in coordinate format, elsefalse
-
isCoordinate
public boolean isCoordinate()Returnstrue
if the vector is in coordinate format, elsefalse
-
isDense
public boolean isDense()Returnstrue
if the vector is in array format, elsefalse
-
isArray
public boolean isArray()Returnstrue
if the vector is in array format, elsefalse
-
isReal
public boolean isReal()Returnstrue
if the vector stores real numbers, elsefalse
-
isInteger
public boolean isInteger()Returnstrue
if the vector stores integers, elsefalse
-
isComplex
public boolean isComplex()Returnstrue
if the vector stores complex numbers, elsefalse
-
isPattern
public boolean isPattern()Returnstrue
if the vector does not store any numbers, 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 vector coordinate real
-