Package no.uib.cipr.matrix.io
Class VectorInfo
- java.lang.Object
-
- no.uib.cipr.matrix.io.VectorInfo
-
public class VectorInfo extends java.lang.ObjectContains information on a vector in a variant of the Matrix Market exchange format
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVectorInfo.VectorFieldWhat 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 booleanisArray()Returnstrueif the vector is in array format, elsefalsebooleanisComplex()Returnstrueif the vector stores complex numbers, elsefalsebooleanisCoordinate()Returnstrueif the vector is in coordinate format, elsefalsebooleanisDense()Returnstrueif the vector is in array format, elsefalsebooleanisInteger()Returnstrueif the vector stores integers, elsefalsebooleanisPattern()Returnstrueif the vector does not store any numbers, elsefalsebooleanisReal()Returnstrueif the vector stores real numbers, elsefalsebooleanisSparse()Returnstrueif the vector is in coordinate format, elsefalsejava.lang.StringtoString()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()
Returnstrueif the vector is in coordinate format, elsefalse
-
isCoordinate
public boolean isCoordinate()
Returnstrueif the vector is in coordinate format, elsefalse
-
isDense
public boolean isDense()
Returnstrueif the vector is in array format, elsefalse
-
isArray
public boolean isArray()
Returnstrueif the vector is in array format, elsefalse
-
isReal
public boolean isReal()
Returnstrueif the vector stores real numbers, elsefalse
-
isInteger
public boolean isInteger()
Returnstrueif the vector stores integers, elsefalse
-
isComplex
public boolean isComplex()
Returnstrueif the vector stores complex numbers, elsefalse
-
isPattern
public boolean isPattern()
Returnstrueif 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:
toStringin classjava.lang.Object
-
-