Package no.uib.cipr.matrix.io
Class VectorInfo
- java.lang.Object
-
- no.uib.cipr.matrix.io.VectorInfo
-
public class VectorInfo extends java.lang.Object
Contains information on a vector in a variant of the Matrix Market exchange format
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VectorInfo.VectorField
What kind of numbers are stored
-
Constructor Summary
Constructors Constructor Description VectorInfo(boolean sparse, VectorInfo.VectorField field)
Creates a specific type
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isArray()
Returnstrue
if the vector is in array format, elsefalse
boolean
isComplex()
Returnstrue
if the vector stores complex numbers, elsefalse
boolean
isCoordinate()
Returnstrue
if the vector is in coordinate format, elsefalse
boolean
isDense()
Returnstrue
if the vector is in array format, elsefalse
boolean
isInteger()
Returnstrue
if the vector stores integers, elsefalse
boolean
isPattern()
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
java.lang.String
toString()
Returns a string representation of the specifier.
-
-
-
Constructor Detail
-
VectorInfo
public VectorInfo(boolean sparse, VectorInfo.VectorField field)
Creates a specific type- Parameters:
sparse
- True for sparse vectors, else falsefield
- Type of data stored
-
-
Method Detail
-
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
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 vector coordinate real
- Overrides:
toString
in classjava.lang.Object
-
-