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

📄 matrixoperation1.h

📁 该程序包实现了几个常用的模式识别分类器算法
💻 H
字号:
#ifndef _MATRIXOPERATION1_H
#define _MATRIXOPERATION1_H 1

enum   states{error,noerror,nosamesize,nopdataspace};
typedef double DOUBLE; 

class   CMatrix
{
	public:
	CMatrix();
	~CMatrix();
	void getnumber();                    //输入矩阵
	void shownumber();                   //输出矩阵
	states issamesize1();                //方阵的值与方阵的幂还有逆判断
	states issamesize2(CMatrix &b);      //矩阵加法与矩阵减法的判断
	states issamesize3(CMatrix &b);      //矩阵乘法的判断 
	states issamesize4(CMatrix &b);      //矩阵除法的判断
	states isempty();                    //指针的判断
	DOUBLE det();                           //方阵的值
	states pow(CMatrix &c,int n);        //方阵的幂
	states inv(CMatrix &c);              //方阵的逆
	states tran(CMatrix &c);             //矩阵的转置
	states add(CMatrix &b, CMatrix &c); //矩阵的加法
	states sub(CMatrix &b, CMatrix &c); //矩阵的减法
	states mul(CMatrix &b, CMatrix &c); //矩阵的乘法
	states divi(CMatrix &b, CMatrix &c);//矩阵的除法
	public:
	DOUBLE *pdata;
	int nline;
	int ncol;
	int flag_det;// 为了正确输出det
};
#endif

⌨️ 快捷键说明

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