T - the type to be read in which has to extend AbstractGenericMatrix.abstract class AbstractPrimitiveMatrixReader<T extends AbstractGenericMatrix<?,?>> extends OctaveDataReader
| Modifier and Type | Field and Description |
|---|---|
protected static String |
NCOLUMNS |
protected static String |
NDIMS |
protected static String |
NROWS |
| Constructor and Description |
|---|
AbstractPrimitiveMatrixReader() |
| Modifier and Type | Method and Description |
|---|---|
(package private) abstract T |
createOctaveValue(int[] size) |
T |
read(BufferedReader reader)
The matrix formats, e.g.
|
private T |
read2dmatrix(BufferedReader reader,
String rowsLine) |
protected int[] |
readSize2dmatrix(BufferedReader reader,
String rowsLine)
Reads lines NROWS <num of rows> and NCOLUMNS <num of cols>
and returns an array {nrows ncols}.
|
private int[] |
readSizeVectorizedMatrix(BufferedReader reader,
String ndimsLine)
Reads a line NDIMS <num of dims>
followed by a line of dimensions: integers separated by blank
and returns an array with the according entries.
|
private T |
readVectorizedMatrix(BufferedReader reader,
String dimsLine) |
getOctaveDataReader, octaveTypeprotected static final String NDIMS
protected static final String NROWS
protected static final String NCOLUMNS
abstract T createOctaveValue(int[] size)
public T read(BufferedReader reader)
readVectorizedMatrix(BufferedReader, String).
read2dmatrix(BufferedReader, String).
read in class OctaveDataReaderreader - the Reader to read from, will not close readerreader.private T readVectorizedMatrix(BufferedReader reader, String dimsLine)
private int[] readSizeVectorizedMatrix(BufferedReader reader, String ndimsLine)
private T read2dmatrix(BufferedReader reader, String rowsLine)
protected int[] readSize2dmatrix(BufferedReader reader, String rowsLine)
Copyright © 2006–2018 Simuline Organization (l2r). All rights reserved.