mymath.h

来自「一个简单的矩阵类」· C头文件 代码 · 共 54 行

H
54
字号
#ifndef _MYMATH_H_
#define _MYMATH_H_

struct POS{
	double m_dX;
	double m_dY;
	double m_dZ;
	struct POS *next;
};

struct SPEED{
	double m_vX;
	double m_vY;
	double m_vZ;
};

struct ACCELERATION{
	double m_aX;
	double m_aY;
	double m_aZ;
};


class CMatrix:public CObject{
public:
	double *Data;
   
private:
	int m;
	int n;
public:
	CMatrix();
	CMatrix(int);
	CMatrix(int,int);
	CMatrix(int,double);
	~CMatrix();
	CMatrix(CMatrix &m1);
    CMatrix operator + (CMatrix &m1);
	CMatrix operator - (CMatrix &m1);
	CMatrix operator * (CMatrix &m1);
	CMatrix operator * (double f);
	CMatrix operator / (CMatrix &m1);
	CMatrix& operator = (CMatrix &m1);
	CMatrix operator ~();
	void Set(int,int);
	friend double Mod(CMatrix &m1);
	friend CMatrix Chol(CMatrix &m1);
	
};

double Uniform(double,double,long &);
double Gauss(double,double, long &);

#endif

⌨️ 快捷键说明

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