Package eu.simuline.octave.io.impl
Class ComplexMatrixReader
- java.lang.Object
-
- eu.simuline.octave.io.spi.OctaveDataReader
-
- eu.simuline.octave.io.impl.ComplexMatrixReader
-
public final class ComplexMatrixReader extends OctaveDataReader
Reader for the octave type "complex matrix" reading anOctaveComplex
from aBufferedReader
. Note that the entries are of type "complex scalar". Format is:# type: complex matrix # rows: 2 # columns: 2 (1.1,0) (0,1.1) (2.2,0) (0,2.2)
-
-
Constructor Summary
Constructors Constructor Description ComplexMatrixReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
octaveType()
Could be "scalar" or "string" or something else.int
parseColumns(BufferedReader reader)
int
parseRows(BufferedReader reader)
OctaveComplex
read(BufferedReader reader)
Reads anOctaveObject
from a Readerreader
.-
Methods inherited from class eu.simuline.octave.io.spi.OctaveDataReader
getOctaveDataReader
-
-
-
-
Field Detail
-
COLUMNS
private static final String COLUMNS
- See Also:
- Constant Field Values
-
ROWS
private static final String ROWS
- See Also:
- Constant Field Values
-
-
Method Detail
-
octaveType
public String octaveType()
Description copied from class:OctaveDataReader
Could be "scalar" or "string" or something else.- Specified by:
octaveType
in classOctaveDataReader
- Returns:
- the string representation of the octave type
read by this
OctaveDataReader
-
read
public OctaveComplex read(BufferedReader reader)
Description copied from class:OctaveDataReader
Reads anOctaveObject
from a Readerreader
.- Specified by:
read
in classOctaveDataReader
- Parameters:
reader
- the Reader to read from, will not close reader- Returns:
- the object read from
reader
.
-
parseRows
public int parseRows(BufferedReader reader)
- Parameters:
reader
-- Returns:
- the number of rows
-
parseColumns
public int parseColumns(BufferedReader reader)
- Parameters:
reader
-- Returns:
- the number of columns
-
-