1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <!DOCTYPE HTML>
- <html>
- <head>
- <link rel='stylesheet' type='text/css' href='../style.css' >
- <title>libigl file formats | .dmat</title>
- </head>
- <body class=article_outer>
- <div class=article_inner>
- <a href=..><img src=../libigl-logo.jpg alt="igl logo" class=center></a>
- <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 8-byte
- double precision IEEE floating point format.
- </p>
- <p><strong>Note:</strong> Line endings must be <code>'\n'</code> aka char(10) aka line feeds.</p>
- <p>See also: <a href=.>file formats</a></p>
- </div>
- </body>
- </html>
|