関数read_diagonal_matrix マニュアル

(The documentation of function read_diagonal_matrix)

Last Update: 2025/8/8


◆機能・用途(Purpose)

対角行列をファイルから読み込む。
Read a diagonal matrix from a file.


◆形式(Format)

#include <matrix/readwrite.h>
inline struct diagonal_matrix read_diagonal_matrix (const char ∗filename,const char ∗filetype)


◆引数(Arguments)

filename 入力ファイル名から拡張子を除いた文字列。
A string that represents the input file name, excluding the extension.
filetype 入力ファイルの拡張子。 ymaeda_opentoolsの対角行列ファイル形式 (独自のファイル形式参照) のいずれかとする。 末尾に「-」を付けると単純に無視される (関数write_diagonal_matrix と同じ拡張子を利用できるようにこれを認めている)。
The extension of the output file, which must be one of the file formats of a diagonal matrix (see Special file formats). If “-” is appended at the end, it is simply ignored; this option is allowed to share the same extension with function write_diagonal_matrix.


◆動作(Behaviour)

引数filename, filetypeで指定したファイルから対角行列を読み込む。
Read a diagonal matrix from a file specified by arguments filename and filetype.


◆使用例(Example)

struct diagonal_matrix A =read_diagonal_matrix("data","dm");