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

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

#include <sp/matrix.h>

Collaboration diagram for spLMatrix:
Collaboration graph

Public Member Functions

File I/O for Matrix (<sp/fileio.h>)
spLMatrix xlmreadlmatrix (const char *filename, long ncol, int swap)
 
spBool lmwritelmatrix (const char *filename, spLMatrix mat, int swap)
 
Matrix Dump (<sp/fileio.h>)
void lmfdump (spLMatrix mat, FILE *fp)
 
#define lmdump(mat)   lmfdump(mat, (stdout))
 

Data Fields

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

Detailed Description

Matrix type that contains the elements of long type.

Actually, This is a typedefed type by typedef struct _spLMatrix *spLMatrix;. To allocate memory for spLMatrix, call a function with prefix xlm such as xlmalloc() , xlmzeros() , etc. To deallocate memory, call xlmfree() .

Field Documentation

◆ row

long row

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

◆ col

long col

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

◆ data

long** data

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

◆ imag

long** imag

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