spLib
Loading...
Searching...
No Matches
spFMatrix Class Reference

Matrix type that contains the elements of float type. More...

#include <sp/matrix.h>

Collaboration diagram for spFMatrix:
Collaboration graph

Public Member Functions

File I/O for Matrix (<sp/fileio.h>)
spFMatrix xfmreadfmatrix (const char *filename, long ncol, int swap)
 
spBool fmwritefmatrix (const char *filename, spFMatrix mat, int swap)
 
Matrix Dump (<sp/fileio.h>)
void fmfdump (spFMatrix mat, FILE *fp)
 
#define fmdump(mat)   fmfdump(mat, (stdout))
 

Data Fields

long row
 
long col
 
float ** data
 
float ** imag
 

Detailed Description

Matrix type that contains the elements of float type.

Actually, This is a typedefed type by typedef struct _spFMatrix *spFMatrix;. To allocate memory for spFMatrix, call a function with prefix xfm such as xfmalloc() , xfmzeros() , etc. To deallocate memory, call xfmfree() .

Field Documentation

◆ row

long row

The number of rows of spFMatrix. You can access the number of elements as x->row for the memory allocated x of spFMatrix.

◆ col

long col

The number of columns of spFMatrix. You can access the number of elements as x->col for the memory allocated x of spFMatrix.

◆ data

float** data

Data of the real part of spFMatrix. You can access the element of the data at row 0, column 0 as x->data[0][0] for the memory allocated x of spFMatrix.

◆ imag

float** imag

Data of the imaginary part of spFMatrix. You can access the element of the data at row 0, column 0 as x->imag[0][0] for the memory allocated x of spFMatrix. If no imaginary part exists, this member can be NULL.