![]() |
KerMor
0.9
Model order reduction for nonlinear dynamical systems and nonlinear approximation
|
Util: Utility functions for export of matrices and vectors to files. More...
Util: Utility functions for export of matrices and vectors to files.
This class is part of the framework
Homepage
http://www.morepas.org/software/index.htmlDocumentation
http://www.morepas.org/software/kermor/index.htmlLicense
KerMor license conditions Static Public Member Functions | |
static function | saveRealMatrix (mat, file, folder) |
Stores a real double matrix in little endian format. More... | |
static function | saveRealVector (vec, file, folder) |
Stores a real double vector in little endian format. More... | |
static function char jsonobj = | matrixToJSON (double value) |
Takes a matrix and returns a JSON representation as JSONObject with the fields "dim" and "values". More... | |
Static Public Attributes | |
static const | MachineFormat = "ieee-be" |
The machine format (little/big endian, 32/64bit) to use upon export. More... | |
Takes a matrix and returns a JSON representation as JSONObject with the fields "dim" and "values".
The elements are stored inside the values array as double values, iterating through the (multi-dimensional) matrix in the order of the dimensions given in "dim". For a simple matrix this is a column-wise from left to right storage.
value | A double matrix |
jsonobj | A string representation of a JSON object |
Definition at line 140 of file Util.m.
Referenced by kernels.KernelExpansion.toJSON().
|
static |
Stores a real double matrix in little endian format.
The first 64bits are used to encode the row and column numbers as int32, then the next bytes contain rows*cols*8bytes of double values. The matrix is addressed linearly in a row-wise fashion, i.e. first row, second row ...
Definition at line 52 of file Util.m.
References MachineFormat, and t.
Referenced by create_testdata(), and kernels.KernelExpansion.exportToDirectory().
|
static |
Stores a real double vector in little endian format.
The first 64bits are used to encode the vector size as int32, then the next bytes contain size*8bytes of double values.
Definition at line 99 of file Util.m.
References MachineFormat.
Referenced by kernels.KernelExpansion.exportToDirectory().
|
static |
The machine format (little/big endian, 32/64bit) to use upon export.
Default: ieee-be (Big Endian, as Java implements it)
See doc fopen
for more details.
Definition at line 38 of file Util.m.
Referenced by saveRealMatrix(), and saveRealVector().