5.2 Matrix Binary Format

It is used to describe a matrix, such as a direction’s transfer function. An overview is shown in Fig. 5.2.

The first 32 bytes is a string which indicates that the format is a Matrix binary. The next 32 bytes indicates the data type. They are int32, float32, and complex, with the size 4 bytes integer, 4 bytes float, and complex which has 4 bytes float for real numbers and 4 bytes float for imaginary numbers. Next is the dimension of the matrix with a size of 4 bytes integer (Currently the value is fixed to "2" since tensor is not used). Finally, the contents of the rows and columns are saved in the following manner: 1st row 1st column, 1st row 2nd column, 1st row 3rd column, etc. with a size of 4 bytes each.

\includegraphics[width=.9\linewidth ]{fig/formats/matrix-en}
Figure 5.2: Overview of Matrix Binary Format