rlsmatrix.h

来自「实现稀疏矩阵的加法、减法、乘法、还有转置」· C头文件 代码 · 共 31 行

H
31
字号
#ifndef _RLSMatrix_H_
#define _RLSMatrix_H_

#define OK 0
#define ERROR -1

typedef int Status;

#define MAXSIZE 10000
#define MAXRC 10000
typedef int ElemType;
typedef struct {
	int i, j;
	ElemType e;
} Triple;
typedef struct {
	Triple data[MAXSIZE+1];
	int rpos[MAXRC+1];
	int mu, nu, tu;
} RLSMatrix;

extern Status CreateSMatrix_Triple(RLSMatrix *pM);
extern Status CreateSMatrix_Matrix(RLSMatrix *pM);
extern Status PrintSMatrix(const RLSMatrix *pM);
extern Status AddSMatrix(const RLSMatrix *pM, const RLSMatrix *pN, RLSMatrix *pQ);
extern Status SubSMatrix(const RLSMatrix *pM, const RLSMatrix *pN, RLSMatrix *pQ);
extern Status MultSMatrix(const RLSMatrix *pM, const RLSMatrix *pN, RLSMatrix *pQ);
extern Status FastTransposeSMatrix(const RLSMatrix *pM, RLSMatrix *pT);

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?