|
spLib
|
double型を扱うための行列型です. [詳解]
#include <sp/matrix.h>

公開メンバ関数 | |
行列型用ファイル入出力 (<sp/fileio.h>) | |
| spFMatrix | xfmreadfmatrix (const char *filename, long ncol, int swap) |
| spBool | fmwritefmatrix (const char *filename, spFMatrix mat, int swap) |
行列出力 (<sp/fileio.h>) | |
| void | fmfdump (spFMatrix mat, FILE *fp) |
| #define | fmdump(mat) fmfdump(mat, (stdout)) |
フィールド | |
| long | row |
| long | col |
| float ** | data |
| float ** | imag |
double型を扱うための行列型です.
実際には,クラスではなく, typedef struct _spFMatrix *spFMatrix; により typedef された型です. メモリを確保するには, xfmalloc() , xfmzeros() などの xfm で始まる関数を呼び出す必要があります. また,メモリを解放するには, xfmfree() を呼ぶ必要があります.
| long row |
行列の行数を保持します.メモリ確保された spFMatrix 型 x があった場合,その行数は x->row で取得できます.
| long col |
行列の列数を保持します.メモリ確保された spFMatrix 型 x があった場合,その列数は x->col で取得できます.
| float** data |
実部のデータを保持します.メモリ確保された spFMatrix 型 x があった場合,0行0列目の要素は x->data[0][0] で取得できます.
| float** imag |
虚部のデータを保持します.メモリ確保された spFMatrix 型 x があった場合,0行0列目の要素は x->imag[0][0] で取得できます.虚部が存在しない場合はNULLであることがあります.