Package mgui.io.domestic.variables
Class DefaultMatrixFileLoader
java.lang.Object
mgui.io.FileLoader
mgui.io.domestic.variables.MatrixFileLoader
mgui.io.domestic.variables.DefaultMatrixFileLoader
- All Implemented Interfaces:
InterfaceIO
,IconObject
public class DefaultMatrixFileLoader extends MatrixFileLoader
Default implementation of a matrix loader. Loads four standard formats:
- Ascii Full
- Ascii Sparse
- Binary Full
- Binary Sparse
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Andrew Reid
-
Field Summary
Fields inherited from class mgui.io.domestic.variables.MatrixFileLoader
has_header, options
Fields inherited from class mgui.io.FileLoader
dataFile, dataURL
-
Constructor Summary
Constructors Constructor Description DefaultMatrixFileLoader()
DefaultMatrixFileLoader(java.io.File file)
-
Method Summary
Modifier and Type Method Description Jama.Matrix
loadMatrix(ProgressUpdater progress_bar)
Jama.Matrix
loadMatrixAsciiFullBlocking(ProgressUpdater progress_bar)
Jama.Matrix
loadMatrixAsciiSparseBlocking(ProgressUpdater progress_bar)
Jama.Matrix
loadMatrixBinaryFullBlocking(ProgressUpdater progress_bar)
Jama.Matrix
loadMatrixBinarySparseBlocking(ProgressUpdater progress_bar)
java.lang.Object
loadObject(ProgressUpdater progress_bar, InterfaceIOOptions options)
Loads data into an instance of the object corresponding to this loader.Methods inherited from class mgui.io.domestic.variables.MatrixFileLoader
getObjectIcon, load
Methods inherited from class mgui.io.FileLoader
getComplementIOType, getFailureMessage, getFile, getIOType, getOptions, getProgressMessage, getSuccessMessage, getSupportedObjects, getTitle, getWriterComplement, load, load, loadObject, loadObject, loadObject, setFile, setOptions, setURL, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
DefaultMatrixFileLoader
public DefaultMatrixFileLoader() -
DefaultMatrixFileLoader
public DefaultMatrixFileLoader(java.io.File file)
-
-
Method Details
-
loadObject
public java.lang.Object loadObject(ProgressUpdater progress_bar, InterfaceIOOptions options) throws java.io.IOExceptionDescription copied from class:FileLoader
Loads data into an instance of the object corresponding to this loader. If loaded object is of typePersistentObject
, this method should also set the file loader and reference URL for the object. TODO: make generic?- Overrides:
loadObject
in classFileLoader
- Parameters:
progress_bar
- An optional progress updater. Can benull
.options
- Options defining the loading process- Returns:
- Throws:
java.io.IOException
-
loadMatrix
public Jama.Matrix loadMatrix(ProgressUpdater progress_bar) throws java.io.IOException, InterfaceIOException- Specified by:
loadMatrix
in classMatrixFileLoader
- Throws:
java.io.IOException
InterfaceIOException
-
loadMatrixAsciiFullBlocking
public Jama.Matrix loadMatrixAsciiFullBlocking(ProgressUpdater progress_bar) throws java.io.IOException, InterfaceIOException- Throws:
java.io.IOException
InterfaceIOException
-
loadMatrixAsciiSparseBlocking
public Jama.Matrix loadMatrixAsciiSparseBlocking(ProgressUpdater progress_bar) throws java.io.IOException- Throws:
java.io.IOException
-
loadMatrixBinaryFullBlocking
public Jama.Matrix loadMatrixBinaryFullBlocking(ProgressUpdater progress_bar) throws java.io.IOException- Throws:
java.io.IOException
-
loadMatrixBinarySparseBlocking
public Jama.Matrix loadMatrixBinarySparseBlocking(ProgressUpdater progress_bar) throws java.io.IOException- Throws:
java.io.IOException
-