Jpetra  Development
 All Classes Functions Variables
Public Member Functions | List of all members
Jpetra.MatrixMarketIO.MatrixVectorReader Class Reference
Inheritance diagram for Jpetra.MatrixMarketIO.MatrixVectorReader:
Inheritance graph
[legend]
Collaboration diagram for Jpetra.MatrixMarketIO.MatrixVectorReader:
Collaboration graph
[legend]

Public Member Functions

 MatrixVectorReader (Reader in)
 
 MatrixVectorReader (Reader in, int sz)
 
void add (int num, int[] indices)
 
MatrixInfo readMatrixInfo () throws IOException
 
VectorInfo readVectorInfo () throws IOException
 
boolean hasInfo () throws IOException
 
String[] readComments () throws IOException
 
MatrixSize readMatrixSize (MatrixInfo info) throws IOException
 
MatrixSize readArraySize () throws IOException
 
MatrixSize readCoordinateSize () throws IOException
 
VectorSize readVectorSize (VectorInfo info) throws IOException
 
VectorSize readVectorArraySize () throws IOException
 
VectorSize readVectorCoordinateSize () throws IOException
 
void readArray (double[] data) throws IOException
 
void readArray (float[] data) throws IOException
 
void readArray (int[] data) throws IOException
 
void readArray (long[] data) throws IOException
 
void readArray (double[] dataR, double[] dataI) throws IOException
 
void readArray (float[] dataR, float[] dataI) throws IOException
 
void readCoordinate (int[] index, double[] data) throws IOException
 
void readCoordinate (int[] index, float[] data) throws IOException
 
void readCoordinate (int[] index, int[] data) throws IOException
 
void readCoordinate (int[] index, long[] data) throws IOException
 
void readCoordinate (int[] index, float[] dataR, float[] dataI) throws IOException
 
void readCoordinate (int[] index, double[] dataR, double[] dataI) throws IOException
 
void readPattern (int[] index) throws IOException
 
void readCoordinate (int[] row, int[] column, double[] data) throws IOException
 
void readCoordinate (int[] row, int[] column, float[] data) throws IOException
 
void readCoordinate (int[] row, int[] column, int[] data) throws IOException
 
void readCoordinate (int[] row, int[] column, long[] data) throws IOException
 
void readPattern (int[] row, int[] column) throws IOException
 
void readCoordinate (int[] row, int[] column, double[] dataR, double[] dataI) throws IOException
 
void readCoordinate (int[] row, int[] column, float[] dataR, float[] dataI) throws IOException
 
int getInt () throws IOException
 
long getLong () throws IOException
 
double getDouble () throws IOException
 
float getFloat () throws IOException
 

Detailed Description

Reads matrices and vectors

Constructor & Destructor Documentation

Jpetra.MatrixMarketIO.MatrixVectorReader.MatrixVectorReader ( Reader  in)
inline

Constructor for MatrixVectorReader

Parameters
inA Reader
Jpetra.MatrixMarketIO.MatrixVectorReader.MatrixVectorReader ( Reader  in,
int  sz 
)
inline

Constructor for MatrixVectorReader

Parameters
inA Reader
szInput buffer size

Member Function Documentation

void Jpetra.MatrixMarketIO.MatrixVectorReader.add ( int  num,
int[]  indices 
)
inline

Shifts the indices. Useful for converting between 0- and 1-based indicing.

Parameters
numAdded to every index
indicesIndices to shift
double Jpetra.MatrixMarketIO.MatrixVectorReader.getDouble ( ) throws IOException
inline
float Jpetra.MatrixMarketIO.MatrixVectorReader.getFloat ( ) throws IOException
inline
int Jpetra.MatrixMarketIO.MatrixVectorReader.getInt ( ) throws IOException
inline
long Jpetra.MatrixMarketIO.MatrixVectorReader.getLong ( ) throws IOException
inline
boolean Jpetra.MatrixMarketIO.MatrixVectorReader.hasInfo ( ) throws IOException
inline

Checks if a Matrix Market header is present ("%%MatrixMarket")

Returns
True if a header was found, else false
Exceptions
IOException
void Jpetra.MatrixMarketIO.MatrixVectorReader.readArray ( double[]  data) throws IOException
inline

Reads the array data

References Jpetra.MatrixMarketIO.MatrixVectorReader.getDouble().

void Jpetra.MatrixMarketIO.MatrixVectorReader.readArray ( float[]  data) throws IOException
inline

Reads the array data

References Jpetra.MatrixMarketIO.MatrixVectorReader.getFloat().

void Jpetra.MatrixMarketIO.MatrixVectorReader.readArray ( int[]  data) throws IOException
inline

Reads the array data

References Jpetra.MatrixMarketIO.MatrixVectorReader.getInt().

void Jpetra.MatrixMarketIO.MatrixVectorReader.readArray ( long[]  data) throws IOException
inline

Reads the array data

References Jpetra.MatrixMarketIO.MatrixVectorReader.getLong().

void Jpetra.MatrixMarketIO.MatrixVectorReader.readArray ( double[]  dataR,
double[]  dataI 
) throws IOException
inline

Reads the array data. The first array will contain real entries, while the second contain imaginary entries

References Jpetra.MatrixMarketIO.MatrixVectorReader.getDouble().

void Jpetra.MatrixMarketIO.MatrixVectorReader.readArray ( float[]  dataR,
float[]  dataI 
) throws IOException
inline

Reads the array data. The first array will contain real entries, while the second contain imaginary entries

References Jpetra.MatrixMarketIO.MatrixVectorReader.getFloat().

MatrixSize Jpetra.MatrixMarketIO.MatrixVectorReader.readArraySize ( ) throws IOException
inline

Reads in the size of an array matrix. Skips initial comments

References Jpetra.MatrixMarketIO.MatrixVectorReader.getInt().

String [] Jpetra.MatrixMarketIO.MatrixVectorReader.readComments ( ) throws IOException
inline

Reads all the comments (lines starting with ''). Positions the reader at the first non-comment line. Can only be called after reading the matrix or vector info. The comments read does not include '' or the newline

void Jpetra.MatrixMarketIO.MatrixVectorReader.readCoordinate ( int[]  index,
double[]  data 
) throws IOException
inline
void Jpetra.MatrixMarketIO.MatrixVectorReader.readCoordinate ( int[]  index,
float[]  data 
) throws IOException
inline
void Jpetra.MatrixMarketIO.MatrixVectorReader.readCoordinate ( int[]  index,
int[]  data 
) throws IOException
inline

Reads a coordinate vector

References Jpetra.MatrixMarketIO.MatrixVectorReader.getInt().

void Jpetra.MatrixMarketIO.MatrixVectorReader.readCoordinate ( int[]  index,
long[]  data 
) throws IOException
inline
void Jpetra.MatrixMarketIO.MatrixVectorReader.readCoordinate ( int[]  index,
float[]  dataR,
float[]  dataI 
) throws IOException
inline

Reads a coordinate vector. First data array contains real entries, and the second contains imaginary entries

References Jpetra.MatrixMarketIO.MatrixVectorReader.getFloat(), and Jpetra.MatrixMarketIO.MatrixVectorReader.getInt().

void Jpetra.MatrixMarketIO.MatrixVectorReader.readCoordinate ( int[]  index,
double[]  dataR,
double[]  dataI 
) throws IOException
inline

Reads a coordinate vector. First data array contains real entries, and the second contains imaginary entries

References Jpetra.MatrixMarketIO.MatrixVectorReader.getDouble(), and Jpetra.MatrixMarketIO.MatrixVectorReader.getInt().

void Jpetra.MatrixMarketIO.MatrixVectorReader.readCoordinate ( int[]  row,
int[]  column,
double[]  data 
) throws IOException
inline
void Jpetra.MatrixMarketIO.MatrixVectorReader.readCoordinate ( int[]  row,
int[]  column,
float[]  data 
) throws IOException
inline
void Jpetra.MatrixMarketIO.MatrixVectorReader.readCoordinate ( int[]  row,
int[]  column,
int[]  data 
) throws IOException
inline

Reads a coordinate matrix

References Jpetra.MatrixMarketIO.MatrixVectorReader.getInt().

void Jpetra.MatrixMarketIO.MatrixVectorReader.readCoordinate ( int[]  row,
int[]  column,
long[]  data 
) throws IOException
inline
void Jpetra.MatrixMarketIO.MatrixVectorReader.readCoordinate ( int[]  row,
int[]  column,
double[]  dataR,
double[]  dataI 
) throws IOException
inline

Reads a coordinate matrix. First data array contains real entries, and the second contains imaginary entries

References Jpetra.MatrixMarketIO.MatrixVectorReader.getDouble(), and Jpetra.MatrixMarketIO.MatrixVectorReader.getInt().

void Jpetra.MatrixMarketIO.MatrixVectorReader.readCoordinate ( int[]  row,
int[]  column,
float[]  dataR,
float[]  dataI 
) throws IOException
inline

Reads a coordinate matrix. First data array contains real entries, and the second contains imaginary entries

References Jpetra.MatrixMarketIO.MatrixVectorReader.getFloat(), and Jpetra.MatrixMarketIO.MatrixVectorReader.getInt().

MatrixSize Jpetra.MatrixMarketIO.MatrixVectorReader.readCoordinateSize ( ) throws IOException
inline

Reads in the size of a coordinate matrix. Skips initial comments

References Jpetra.MatrixMarketIO.MatrixVectorReader.getInt().

MatrixInfo Jpetra.MatrixMarketIO.MatrixVectorReader.readMatrixInfo ( ) throws IOException
inline

Reads the matrix info for the Matrix Market exchange format. The line must consist of exactly 5 space-separated entries, the first being "%%MatrixMarket"

References Jpetra.MatrixMarketIO.MatrixInfo.GENERAL, and Jpetra.MatrixMarketIO.MatrixInfo.REAL.

MatrixSize Jpetra.MatrixMarketIO.MatrixVectorReader.readMatrixSize ( MatrixInfo  info) throws IOException
inline

Reads in the size of a matrix. Skips initial comments

References Jpetra.MatrixMarketIO.MatrixVectorReader.getInt().

void Jpetra.MatrixMarketIO.MatrixVectorReader.readPattern ( int[]  index) throws IOException
inline

Reads a pattern vector

References Jpetra.MatrixMarketIO.MatrixVectorReader.getInt().

void Jpetra.MatrixMarketIO.MatrixVectorReader.readPattern ( int[]  row,
int[]  column 
) throws IOException
inline

Reads a pattern matrix

References Jpetra.MatrixMarketIO.MatrixVectorReader.getInt().

VectorSize Jpetra.MatrixMarketIO.MatrixVectorReader.readVectorArraySize ( ) throws IOException
inline

Reads in the size of a dense vector. Skips initial comments

References Jpetra.MatrixMarketIO.MatrixVectorReader.getInt().

VectorSize Jpetra.MatrixMarketIO.MatrixVectorReader.readVectorCoordinateSize ( ) throws IOException
inline

Reads in the size of a coordinate vector. Skips initial comments

References Jpetra.MatrixMarketIO.MatrixVectorReader.getInt().

VectorInfo Jpetra.MatrixMarketIO.MatrixVectorReader.readVectorInfo ( ) throws IOException
inline

Reads the vector info for the Matrix Market exchange format. The line must consist of exactly 4 space-separated entries, the first being "%%MatrixMarket"

References Jpetra.MatrixMarketIO.VectorInfo.REAL.

VectorSize Jpetra.MatrixMarketIO.MatrixVectorReader.readVectorSize ( VectorInfo  info) throws IOException
inline

Reads in the size of a vector. Skips initial comments

References Jpetra.MatrixMarketIO.MatrixVectorReader.getInt().


The documentation for this class was generated from the following file: