123456789101112131415161718192021222324252627282930313233343536373839 |
- <!DOCTYPE HTML>
- <html>
- <head>
- <link rel='stylesheet' type='text/css' href='../style.css' >
- <title>IGL_LIB file formats | .dmat</title>
- </head>
- <body>
- <h1>.dmat - dense matrices</h1>
- <hr>
- <p>
- A .dmat file contains a dense matrix in column major order. It can contain
- ASCII or binary data. Note that it is uncompressed so binary only reduces the
- file size by 50%. But writing and reading binary is usualy faster. In MATLAB,
- binary is almost 100x faster.
- </p>
- <h2>ASCII</h2>
- <p>
- The first line is a header containing:
- </p>
- <pre><code>[#cols] [#rows]</code></pre>
- <p>
- Then the coefficients are printed in column-major order separated by spaces.
- </p>
- <h2>Binary</h2>
- <p>
- Binary files will also contain the ascii header, but it should read:
- </p>
- <pre><code>0 0</code></pre>
- <p>
- Then there should be another header containing the size of the binary part:
- </p>
- <pre><code>[#cols] [#rows]</code></pre>
- <p>
- Then coefficents are written in column-major order in Little-endian 4-byte
- double precision IEEE floating point format.
- </p>
- </body>
- </html>
|