Package eu.simuline.octave.io.impl
eu.simuline.octave.io.spi
;
one for each octave type given in octave via typeinfo
.
The reader classes are in
META-INF/services/eu.simuline.octave.io.OctaveDataReader
whereas the writer classes are in
META-INF/services/eu.simuline.octave.io.OctaveDataWriter
.
Consequently, the classes are given by the following table
index | octave class | java class | reader | writer |
---|---|---|---|---|
1 | "<unknown type>" | --- | --- | --- |
2 | "cell" | OctaveCell |
CellReader |
CellWriter |
3 | "scalar" | see 5 | ScalarReader |
see 5 |
4 | "complex scalar" | see 7 | ComplexScalarReader |
see 7 |
5 | "matrix" | OctaveDouble |
MatrixReader |
MatrixWriter |
6 | "diagonal matrix" | --- | --- | --- |
7 | "complex matrix" | OctaveComplex |
ComplexMatrixReader |
??? |
8 | "complex diagonal matrix" | --- | --- | --- |
9 | "range" | OctaveFake | FakeRangeReader | FakeWriter |
10 | "bool" | see 11 | BooleanSingleReader |
see 11 |
11 | "bool matrix" | OctaveBoolean |
BooleanReader |
BooleanWriter |
12 | "string" | OctaveString |
OctaveStringReader |
OctaveStringWriter /--- |
13 | "sq_string" | see 12 | OctaveSqStringReader |
OctaveStringWriter /--- |
14 | "int8 scalar" | --- | --- | --- |
15 | "int16 scalar" | --- | --- | --- |
16 | "int32 scalar" | see 24 | Int32ScalarReader |
see 24 |
17 | "int64 scalar" | see 25 | Int64ScalarReader |
see 25 |
18 | "uint8 scalar" | --- | --- | --- |
19 | "uint16 scalar" | --- | --- | --- |
20 | "uint32 scalar" | --- | --- | --- |
21 | "uint64 scalar" | --- | --- | --- |
22 | "int8 matrix" | --- | --- | --- |
23 | "int16 matrix" | --- | --- | --- |
24 | "int32 matrix" | OctaveInt |
Int32MatrixReader |
Int32MatrixWriter |
25 | "int64 matrix" | OctaveLong |
Int64MatrixReader |
Int64MatrixWriter |
26 | "uint8 matrix" | --- | --- | --- |
26 | "uint8 matrix" Uint?? | use OctaveInt with int32 |
do not use: Uint8MatrixReader |
--- |
27 | "uint16 matrix" | --- | --- | --- |
28 | "uint32 matrix" | --- | --- | --- |
29 | "uint64 matrix" | --- | --- | --- |
30 | "sparse bool matrix" | OctaveSparseBoolean |
SparseBooleanReader |
SparseBooleanWriter |
31 | "sparse matrix" | --- | --- | --- |
32 | "sparse complex matrix" | --- | --- | --- |
33 | "struct" | OctaveStruct |
StructReader |
StructWriter |
34 | "scalar struct" | OctaveStruct |
ScalarStructReader |
--- |
35 | "class" | --- | --- | --- |
36 | "cs-list" | --- | --- | --- |
37 | "magic-colon" | --- | --- | --- |
38 | "built-in function" | --- | --- | --- |
39 | "user-defined function" | --- | --- | --- |
40 | "dynamically-linked function" | --- | --- | --- |
41 | "function handle" | OctaveFunctionHandle |
???? | FunctionHandleWriter |
42 | "inline function" (which will be deprecated) | --- | --- | --- |
43 | "float scalar" | --- | --- | --- |
44 | "float complex scalar" | --- | --- | --- |
45 | "float matrix" | --- | --- | --- |
46 | "float diagonal matrix" | --- | --- | --- |
47 | "float complex matrix" | --- | --- | --- |
48 | "float complex diagonal matrix" | --- | --- | --- |
49 | "permutation matrix" | --- | --- | --- |
50 | "null_matrix" | --- | --- | --- |
51 | "null_string" | --- | --- | --- |
52 | "null_sq-string" | --- | --- | --- |
53 | "lazy_index" | --- | --- | --- |
54 | "onCleanup" | --- | --- | --- |
55 | "octave_java" | --- | --- | --- |
56 | "object" | --- | --- | --- |
There three categories of basic types in octave: boolean, floating point and integer.
-
bool
is the boolean (scalar) type, -
double
andfloat
are the floating point (scalar) types, -
int8
,int16
,int32
andint64
, are the signed (scalar) integer types anduint8
,uint16
,uint32
anduint64
, are the according unsigned (scalar) integer types.
Principally, all these types may be vector valued, matrix valued
or even in higher dimensions.
To express this, they are endowed with the suffix matrix
even for higher dimensions
and are thus called bool matrix
, float matrix
,
int8 matrix
, int16 matrix
,
int32 matrix
and int64 matrix
and accordingly for the unsigned integers.
Since double is the standard type occurring most frequently,
what should be called double matrix
is just called matrix
.
Likewise, if endowed with the suffix scalar
,
only scalars, i.e. 1x1 matrices are allowed.
This type is to spare memory, i.e. the format information.
likewise,
double scalar
is just called scalar
and
bool scalar
is just called bool
,
which seems strange but comes from the fact,
that bools mostly come as scalars.
The other names are regular,
as int8 scalar
, int16 scalar
,
int32 scalar
and int64 scalar
.
Although strutcs are not atomic but as the name says structures,
they can in general be array valued.
If not, it is a scalar struct
,
in the general case it is just a struct
Note that this is the only case where the text scalar
is prefixed (since scalar
itself
is short for double scalar
).
For the moment, we do not treat complex types.
Floating matrix types may be diagonal.
Thus we have double diagonal matrix
called just diagonal matrix
,
float diagonal matrix
.
Floating matrix types and also boolean matrices may be sparse.
Thus we have double sparse matrix
called just sparse matrix
,
but no float sparse matrix
.
-
BooleanReader
/BooleanWriter
for reading/writing octave (double) "bool matrix"s represented byOctaveBoolean
.There is also a
BooleanSingleReader
for reading octave (scalar) "bool"s whereas no BooleanSingleWriter is provided. -
CellReader
/CellWriter
for reading/writing octave "cell"s represented byOctaveCell
. -
MatrixReader
/MatrixWriter
for reading/writing octave (double) "matrix"s represented byOctaveDouble
.There is also a
ScalarReader
for reading octave (double) "scalar"s whereas noScalarWriter
is provided. -
ComplexMatrixReader
/ComplexScalarReader
for reading octave (double) "complex matrix"s and "complex scalar"s both represented byOctaveComplex
.Both
ComplexMatrixWriter
andComplexScalarWriter
are missing. -
FakeRangeReader
***** andFakeWriter
... maybe for ranges. Seemingly,FakeRangeReader
is not fully functional. Both read/writeOctaveFake
; packageeu.simuline.octave.type
does not contain a class representing range explicitly. -
FunctionHandleWriter
for writing octave "function handle"s represented byOctaveFunctionHandle
. CAUTION: there is no according reader.There is no support for octave types "built-in function", "user-defined function", "dynamically-linked function", "inline function" (which will be deprecated).
-
OctaveStringReader
/OctaveStringWriter
for reading/writing octave "string"s represented byOctaveString
. CAUTION: There is also anOctaveSqStringReader
, which is not fully functional: It reads likeOctaveStringReader
and performs an additional check to ensure that the octave "sq_string" can be in fact represented by an octave "string". ThusOctaveStringReader
andOctaveSqStringReader
share the same writerOctaveStringWriter
. -
StructReader
/StructWriter
for reading/writing octave "struct"s represented byOctaveStruct
.There is also a
ScalarStructReader
for reading octave "scalar struct"s (which is optimized for 1x1 structs) also intoOctaveStruct
. There is no accordingScalarStructWriter
. -
SparseBooleanReader
/SparseBooleanWriter
for reading/writing octave "sparse bool matrix"s represented byOctaveSparseBoolean
.Note that there is no treatment for the octave types "sparse matrix" representing doubles and "sparse complex matrix".
-
Uint8MatrixReader
for readingoctave (double) "uint8 matrix"s represented byOctaveInt
. There is no according writer. Also there are no reader/writer for other octave integer types: "uint8 scalar", and in both variants, scalar and matrix, and signed/unsigned "int16", "int32", "int64". Note that java has no type corresponding with "uint64". - Both, (real) "diagonal matrix" and "complex diagonal matrix" reader/writer are missing.
- There is no support for octave type "octave_java"
- There is no support for octave types "class", "cs-list", "magic-colon", "lazy_index" "onCleanup", "object".
- There is no support for octave "float" types: neither scalar, nor matrix, neither real nor complex, and not for diagonal matrices.
- There is no support for octave "permutation matrix".
- There is no support for octave "null_matrix", "null_string" nor "null_sq_string".
- Of course, there cannot be a reader/writer for octave's unknown type.
-
Class Summary Class Description AbstractLogicalFloatingPointWriter<T extends AbstractGenericMatrix<?,?>> Common Writer class for logical and floating point types: Boolean, Double, ...AbstractOctaveStringReader The reader of string/sq_string.AbstractPrimitiveMatrixReader<T extends AbstractGenericMatrix<?,?>> Common Reader class for matrices of primitive java types: Boolean, Double, Integer....AbstractPrimitiveMatrixWriter<T extends AbstractGenericMatrix<?,?>> Common Writer class for primitive java types: Boolean, Double, Integer....AbstractPrimitiveScalarReader<T extends AbstractGenericMatrix<?,?>> Common Reader class for scalars of primitive java types: Boolean, Double, Integer....BooleanReader The reader for the octave type "bool matrix" (matrix with boolean entries) reading anOctaveBoolean
from aBufferedReader
. **** the class name should be BoolMatrixReader ****BooleanSingleReader The reader for the octave type (scalar) "bool" reading anOctaveBoolean
from aBufferedReader
.BooleanWriter The writer for the octave type "bool matrix" (matrix with boolean entries) and "bool", which is short for "bool scalar", writing anOctaveBoolean
to aWriter
.CellReader The reader for the octave type "cell" reading in anOctaveCell
from aBufferedReader
.CellWriter The writer for the octave type "cell" writing anOctaveCell
to aWriter
.ComplexMatrixReader Reader for the octave type "complex matrix" reading anOctaveComplex
from aBufferedReader
.ComplexScalarReader The reader for the octave type "complex scalar" with 'double' components reading anOctaveComplex
from aBufferedReader
.FakeRangeReader The reader for the octave type "range" (**** seems not general enough) reading anOctaveFake
**** from aBufferedReader
.FakeWriter The writer of allOctaveFake
objects.FunctionHandleWriter The writer for the octave type "function handle" writing anOctaveFunctionHandle
to aWriter
.Int32MatrixReader The reader for the octave type "int32 matrix" reading anOctaveInt
from aBufferedReader
.Int32MatrixWriter Int32ScalarReader The reader for the octave type "int32 scalar" reading anOctaveInt
from aBufferedReader
.Int64MatrixReader The reader for the octave type "int64 matrix" reading anOctaveLong
from aBufferedReader
.Int64MatrixWriter The writer for the octave type "int32 matrix" writing anOctaveLong
to aWriter
.Int64ScalarReader The reader for the octave type "int64 scalar" reading anOctaveLong
from aBufferedReader
.MatrixReader The reader for the octave type "matrix" (of double) reading anOctaveDouble
from aBufferedReader
.MatrixWriter The writer for the octave types "matrix" (of double) and "scalar" (of double) writing anOctaveDouble
to aWriter
.OctaveSqStringReader The name isOctaveSqStringReader
instead ofStringSqReader
to be consistent withOctaveStringReader
.OctaveStringReader The reader for the octave type "string" reading anOctaveString
from aBufferedReader
.OctaveStringWriter The writer for the octave type "string" writing anOctaveString
to aWriter
.ScalarReader The reader for the octave type "scalar" (double) reading anOctaveDouble
from aBufferedReader
.ScalarStructReader The reader for the octave type "scalar struct" (which is an encoding similar to "struct" introduced in octave 3.6, optimized to the 1x1 struct) reading anOctaveObject
from aBufferedReader
.SparseBooleanReader The reader for the octave type "sparse bool matrix" reading anOctaveSparseBoolean
from aBufferedReader
.SparseBooleanWriter The writer for the octave type "sparse bool matrix" writing anOctaveSparseBoolean
to aWriter
.StructReader The reader for the octave type "struct" reading anOctaveStruct
from aBufferedReader
.StructWriter The writer for the octave type "struct" writing anOctaveStruct
to aWriter
.TestIoFakeRange Test read/write ofOctaveFake
TestIoFunctionHandle Test read/write ofOctaveFunctionHandle
TestIoOctaveBoolean Test read/write ofOctaveBoolean
TestIoOctaveCell Test read/write ofOctaveCell
TestIoOctaveComplex Test read/write ofOctaveComplex
TestIoOctaveDouble Test read/write ofOctaveDouble
TestIoOctaveInt Test read/write ofOctaveInt
TestIoOctaveLong Test read/write ofOctaveLong
TestIoOctaveSparseBoolean Test read/write ofOctaveBoolean
TestIoOctaveSqString Test reading of sq_string (can not be written)TestIoOctaveString Test read/write ofOctaveString
TestIoOctaveStruct Test I/O on OctaveStructUint8MatrixReader This is deactivated reading anOctaveInt
from aBufferedReader
.Uint8MatrixWriter This is deactivated.