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.
-
boolis the boolean (scalar) type, -
doubleandfloatare the floating point (scalar) types, -
int8,int16,int32andint64, are the signed (scalar) integer types anduint8,uint16,uint32anduint64, 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/BooleanWriterfor reading/writing octave (double) "bool matrix"s represented byOctaveBoolean.There is also a
BooleanSingleReaderfor reading octave (scalar) "bool"s whereas no BooleanSingleWriter is provided. -
CellReader/CellWriterfor reading/writing octave "cell"s represented byOctaveCell. -
MatrixReader/MatrixWriterfor reading/writing octave (double) "matrix"s represented byOctaveDouble.There is also a
ScalarReaderfor reading octave (double) "scalar"s whereas noScalarWriteris provided. -
ComplexMatrixReader/ComplexScalarReaderfor reading octave (double) "complex matrix"s and "complex scalar"s both represented byOctaveComplex.Both
ComplexMatrixWriterandComplexScalarWriterare missing. -
FakeRangeReader***** andFakeWriter... maybe for ranges. Seemingly,FakeRangeReaderis not fully functional. Both read/writeOctaveFake; packageeu.simuline.octave.typedoes not contain a class representing range explicitly. -
FunctionHandleWriterfor 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/OctaveStringWriterfor reading/writing octave "string"s represented byOctaveString. CAUTION: There is also anOctaveSqStringReader, which is not fully functional: It reads likeOctaveStringReaderand performs an additional check to ensure that the octave "sq_string" can be in fact represented by an octave "string". ThusOctaveStringReaderandOctaveSqStringReadershare the same writerOctaveStringWriter. -
StructReader/StructWriterfor reading/writing octave "struct"s represented byOctaveStruct.There is also a
ScalarStructReaderfor reading octave "scalar struct"s (which is optimized for 1x1 structs) also intoOctaveStruct. There is no accordingScalarStructWriter. -
SparseBooleanReader/SparseBooleanWriterfor 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".
-
Uint8MatrixReaderfor 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 anOctaveBooleanfrom aBufferedReader. **** the class name should be BoolMatrixReader ****BooleanSingleReader The reader for the octave type (scalar) "bool" reading anOctaveBooleanfrom aBufferedReader.BooleanWriter The writer for the octave type "bool matrix" (matrix with boolean entries) and "bool", which is short for "bool scalar", writing anOctaveBooleanto aWriter.CellReader The reader for the octave type "cell" reading in anOctaveCellfrom aBufferedReader.CellWriter The writer for the octave type "cell" writing anOctaveCellto aWriter.ComplexMatrixReader Reader for the octave type "complex matrix" reading anOctaveComplexfrom aBufferedReader.ComplexScalarReader The reader for the octave type "complex scalar" with 'double' components reading anOctaveComplexfrom aBufferedReader.FakeRangeReader The reader for the octave type "range" (**** seems not general enough) reading anOctaveFake**** from aBufferedReader.FakeWriter The writer of allOctaveFakeobjects.FunctionHandleWriter The writer for the octave type "function handle" writing anOctaveFunctionHandleto aWriter.Int32MatrixReader The reader for the octave type "int32 matrix" reading anOctaveIntfrom aBufferedReader.Int32MatrixWriter Int32ScalarReader The reader for the octave type "int32 scalar" reading anOctaveIntfrom aBufferedReader.Int64MatrixReader The reader for the octave type "int64 matrix" reading anOctaveLongfrom aBufferedReader.Int64MatrixWriter The writer for the octave type "int32 matrix" writing anOctaveLongto aWriter.Int64ScalarReader The reader for the octave type "int64 scalar" reading anOctaveLongfrom aBufferedReader.MatrixReader The reader for the octave type "matrix" (of double) reading anOctaveDoublefrom aBufferedReader.MatrixWriter The writer for the octave types "matrix" (of double) and "scalar" (of double) writing anOctaveDoubleto aWriter.OctaveSqStringReader The name isOctaveSqStringReaderinstead ofStringSqReaderto be consistent withOctaveStringReader.OctaveStringReader The reader for the octave type "string" reading anOctaveStringfrom aBufferedReader.OctaveStringWriter The writer for the octave type "string" writing anOctaveStringto aWriter.ScalarReader The reader for the octave type "scalar" (double) reading anOctaveDoublefrom 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 anOctaveObjectfrom aBufferedReader.SparseBooleanReader The reader for the octave type "sparse bool matrix" reading anOctaveSparseBooleanfrom aBufferedReader.SparseBooleanWriter The writer for the octave type "sparse bool matrix" writing anOctaveSparseBooleanto aWriter.StructReader The reader for the octave type "struct" reading anOctaveStructfrom aBufferedReader.StructWriter The writer for the octave type "struct" writing anOctaveStructto aWriter.TestIoFakeRange Test read/write ofOctaveFakeTestIoFunctionHandle Test read/write ofOctaveFunctionHandleTestIoOctaveBoolean Test read/write ofOctaveBooleanTestIoOctaveCell Test read/write ofOctaveCellTestIoOctaveComplex Test read/write ofOctaveComplexTestIoOctaveDouble Test read/write ofOctaveDoubleTestIoOctaveInt Test read/write ofOctaveIntTestIoOctaveLong Test read/write ofOctaveLongTestIoOctaveSparseBoolean Test read/write ofOctaveBooleanTestIoOctaveSqString Test reading of sq_string (can not be written)TestIoOctaveString Test read/write ofOctaveStringTestIoOctaveStruct Test I/O on OctaveStructUint8MatrixReader This is deactivated reading anOctaveIntfrom aBufferedReader.Uint8MatrixWriter This is deactivated.