E - 2D matrix element typepublic abstract class AbstractMatrix2DReader<E> extends Object implements Matrix2DReader<E>
| Constructor and Description |
|---|
AbstractMatrix2DReader() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Matrix2D<E> |
createMatrix2D(long rows,
long columns,
int cardinality)
Create and return a new instance of an implementation of Matrix2D.
|
protected abstract E |
parse(String value)
Parse the specified value to an instance of type
E. |
Matrix2D<E> |
read(File file)
Read a 2D matrix from the specified file.
|
Matrix2D<E> |
read(URL url)
Read a 2D matrix from the specified URL.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreadprotected abstract E parse(String value) throws IOException
E.value - value to parseEIOException - if an IO error occursprotected abstract Matrix2D<E> createMatrix2D(long rows, long columns, int cardinality)
rows - number of rowscolumns - number of columnscardinality - approximate cardinalitypublic final Matrix2D<E> read(File file) throws IOException
read in interface Matrix2DReader<E>file - file to read from, must not be nullIOException - if an IO error occurspublic final Matrix2D<E> read(URL url) throws IOException
read in interface Matrix2DReader<E>url - URL to read from, must not be nullIOException - if an IO error occursCopyright (c) 2008-2013 held jointly by the individual authors. Licensed under the GNU Lesser General Public License (LGPL).