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, optionsFields 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.MatrixloadMatrix(ProgressUpdater progress_bar)Jama.MatrixloadMatrixAsciiFullBlocking(ProgressUpdater progress_bar)Jama.MatrixloadMatrixAsciiSparseBlocking(ProgressUpdater progress_bar)Jama.MatrixloadMatrixBinaryFullBlocking(ProgressUpdater progress_bar)Jama.MatrixloadMatrixBinarySparseBlocking(ProgressUpdater progress_bar)java.lang.ObjectloadObject(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, loadMethods inherited from class mgui.io.FileLoader
getComplementIOType, getFailureMessage, getFile, getIOType, getOptions, getProgressMessage, getSuccessMessage, getSupportedObjects, getTitle, getWriterComplement, load, load, loadObject, loadObject, loadObject, setFile, setOptions, setURL, toStringMethods 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:FileLoaderLoads 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:
loadObjectin 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:
loadMatrixin classMatrixFileLoader- Throws:
java.io.IOExceptionInterfaceIOException
-
loadMatrixAsciiFullBlocking
public Jama.Matrix loadMatrixAsciiFullBlocking(ProgressUpdater progress_bar) throws java.io.IOException, InterfaceIOException- Throws:
java.io.IOExceptionInterfaceIOException
-
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
-