⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rlsmatrix.h

📁 实现稀疏矩阵的加法、减法、乘法、还有转置
💻 H
字号:
#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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -