HLIBpro
2.3.1
|
Table of contents |
𝓗𝖫𝖨𝖡𝗉𝗋𝗈 supports several file formats for reading/writing coordinates, vectors, matrices and files, e.g. Matlab, Harwell/Boeing, MatrixMarket, SAMG, PLY, Gmsh, SurfaceMesh. However, not all features of each file format is fully implemented in 𝓗𝖫𝖨𝖡𝗉𝗋𝗈, e.g. only a single object may be written to Matlab files and only triangular grids are supported in corresponding file formats.
The following file formats are supported for reading and writing matrices:
Format | Class | Remarks |
---|---|---|
𝓗𝖫𝖨𝖡𝗉𝗋𝗈 format | THLibMatrixIO |
|
Matlab v5 | TMatlabMatrixIO |
|
Harwell/Boeing Harwell/Rutherford | THBMatrixIO |
|
MatrixMarket | TMMMatrixIO |
|
SAMG | TSAMGMatrixIO |
|
All storage classes implement the same basic interface defined by the functions:
Furthermore, a class for reading/writing matrices with file format autodetection is available (TAutoMatrixIO). In case of reading from a file, the auto detection works by actually looking at the stored data and hence, is very robust in choosing the correct file format. On the other hand, if data output is used, only the file name is used to decide the format. The following rules apply based on the file name extension:
Extension | File Format |
---|---|
hm | HLIBpro format |
mat, m | Matlab format |
hb, rb, rua, rsa, psa | Harwell/Boeing format |
mtx | MatrixMarket format |
amg | SAMG format |
The I/O functions from TAutoMatrixIO are also available in direct from via the functions:
If the file format supports named storage, e.g. Matlab, the corresponding matrix name may be provided by an additional argument:
For all other file formats, this parameter will be ignored.