dmat.html 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <link rel='stylesheet' type='text/css' href='../style.css' >
  5. <title>IGL_LIB file formats | .dmat</title>
  6. </head>
  7. <body>
  8. <h1>.dmat - dense matrices</h1>
  9. <hr>
  10. <p>
  11. A .dmat file contains a dense matrix in column major order. It can contain
  12. ASCII or binary data. Note that it is uncompressed so binary only reduces the
  13. file size by 50%. But writing and reading binary is usualy faster. In MATLAB,
  14. binary is almost 100x faster.
  15. </p>
  16. <h2>ASCII</h2>
  17. <p>
  18. The first line is a header containing:
  19. </p>
  20. <pre><code>[#cols] [#rows]</code></pre>
  21. <p>
  22. Then the coefficients are printed in column-major order separated by spaces.
  23. </p>
  24. <h2>Binary</h2>
  25. <p>
  26. Binary files will also contain the ascii header, but it should read:
  27. </p>
  28. <pre><code>0 0</code></pre>
  29. <p>
  30. Then there should be another header containing the size of the binary part:
  31. </p>
  32. <pre><code>[#cols] [#rows]</code></pre>
  33. <p>
  34. Then coefficents are written in column-major order in Little-endian 4-byte
  35. double precision IEEE floating point format.
  36. </p>
  37. </body>
  38. </html>