📄 complexmatrix.h
字号:
// ComplexMatrix.h: interface for the CComplexMatrix class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(__COMPLEXMATRIX_H__)
#define __COMPLEXMATRIX_H__
#include <complex>
using namespace std;
typedef complex<double> Complex;
class CComplexMatrix
{
protected:
struct CNode
{
int nRow;
int nCol;
CNode *pRight;
CNode *pDown;
CNode *pPrev;
CNode *pNext;
Complex data;
};
CNode *pHead;
CNode *pTail;
CNode *pCurrent;
CNode *pData;
void Copy(const CComplexMatrix &src);
public:
CComplexMatrix();
void Create(int row,int col);
virtual ~CComplexMatrix();
void Store(int row,int col,const Complex newElement);
void Add(int row,int col,const Complex newElement);
void GetData(int &row,int &col,Complex &data);
void GoToHead();
void GoToTail();
void GoNext();
void GoPrev();
void GoRight();
void GoDown();
BOOL IsEmpty();
void Empty();
CComplexMatrix operator +(const CComplexMatrix &src);
CComplexMatrix operator -(const CComplexMatrix &src);
CComplexMatrix operator *(const CComplexMatrix &src);
CComplexMatrix operator -();
void operator =(const CComplexMatrix &src);
void operator +=(const CComplexMatrix &src);
void operator -=(const CComplexMatrix &src);
void operator *=(const CComplexMatrix &src);
CComplexMatrix Transpose();
};
#endif // !defined(__COMPLEXMATRIX_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -