バイナリ単精度実数行列型 ファイル仕様

(Definition of “Binary Float Matrix” format)

Last Update: 2021/6/28



拡張子(Extension)
bfm


拡張子の意味 (Meaning of the extension)
Binary Float Matrix


対象とする構造体の種類 (Supported structures)


データの保存形式 (Format of each data)
単精度浮動小数点数(バイナリ形式)
Floating-point numbers in the binary format of single precision


特徴(Features)
cm型と同じ内容の出力をバイナリ形式で行う (但し、タブや改行文字等は無し)。 バイナリを用いるためにファイルサイズが小さくなる。 bdm型と比較すると精度は悪くなるが、 それでも6桁の精度があるのでcm型とは同程度である。 短所はデータを簡単に見れないことと、 ymaeda_opentoolsでのファイル入出力に時間がかかること (ymaeda_opentoolsでは行列をdouble型で扱っており 入出力の際に型変換が必要になるため)。
The same record as in the cm format (but with no tab and linebreak), written in a binary format. The file size is small owing to the use of the binary format. Although the values are less precise than those in the bdm format, they still have a precision of 6 digits which is comparable to that of the cm format. Shortages are that the data is not easily visible, and that the input/output of the file of this format by ymaeda_opentools takes time (because ymaeda_opentools uses double precision for matrices, a cast is needed during the input/output).


仕様詳細(Detail)


(Example)
以下の2×3行列を考える。
Let us consider the 2×3 matrix given below:

\[\begin{pmatrix} 1 & 0.12 & 0.0345 \\ 6.7 & 8901 & 23.4 \end{pmatrix}\]
この行列を表現するためのファイルの中身は以下のようになる。
The file to represent this matrix is as below.

バイト
Bytes

Type

Value
1-4int2
5-8int3
9-12float1.0
13-16float0.12
17-20float0.0345
21-24float6.7
25-28float8901.0
29-32float23.4