public class MatrixFactory
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static MatrixFactory |
getInstance()
Retrieve the singleton instance of the Matrix Factory.
|
Matrix |
getMatrix(java.lang.String filename)
Retrieve the
Matrix associated with the matrix that was
stored in a file. |
Matrix |
getMatrix(java.lang.String filename,
int numOfRows,
int numOfColumns,
int entriesType,
boolean rowMajorFormat)
Retrieve/create a matrix based on the specified arguments.
|
public static MatrixFactory getInstance()
public Matrix getMatrix(java.lang.String filename, int numOfRows, int numOfColumns, int entriesType, boolean rowMajorFormat) throws java.io.IOException
filename
- The file associated with the matrix.numOfRows
- The number of rows within the matrixnumOfColumns
- The number of columns for this matrixentriesType
- The DATA type for the entries. See the Matrix
class in this package for more details.rowMajorFormat
- Indicates whether the data is stored (needs to be stored) in
ROW MAJOR format.Matrix
instance.java.io.IOException
- If there are problems reading/writing from the file system.public Matrix getMatrix(java.lang.String filename) throws java.io.IOException
Matrix
associated with the matrix that was
stored in a file.filename
- The file where the matrix was storedMatrix
instancejava.io.IOException
- If there are problems reading/writing from the file system.