matrix.h
来自「在VC环境下采用希尔密码体制加密、解密和破译。该软件实现了输入任意长度的密钥对文」· C头文件 代码 · 共 48 行
H
48 行
#ifndef __MATRIX_H__
#define __MATRIX_H__
#define MAPLEN 256
#include <stdlib.h>
#include <string.h>
#include "math.h"
#include "stdio.h"
#include <MEMORY.h>
#include "iostream.h"
long Reciprocal(int nSrc);
class CMatrix
{
public:
BOOL operator == (const CMatrix & right);
BOOL IsEmpty();
const long * GetMatrix() const;
CMatrix & Adjoint();
void Transpose();
friend ostream & operator << (ostream & out, const CMatrix & matrix);
CMatrix(const long * pMatrix, const unsigned int ROW, const unsigned int COL);
long * GetSubPhalanx(const long * pPhalanx, const int ROW, const int COL, const int I, const int J );
long GetPhalanxValue();
CMatrix();
CMatrix(const CMatrix & matrix);
CMatrix & operator = (const CMatrix & matrix);
void SetElement(int nRow, int nCol, long lValue);
int GetElement(int nRow, int nCol, long & lValue) const;
CMatrix & operator / (const long lDivisor);
CMatrix operator * (const CMatrix & right);
CMatrix operator * (const long right);
int GetRows() const;
int GetCols() const;
void InitMatrix(int nRows, int nCols);
void Mod(int nModulus);
~CMatrix();
protected:
long GetPhalanxValue(const long * pPhalanx, const int RANGE);
private:
long *m_pMatrix;
int m_nRow; // 矩阵的行数
int m_nCol; // 矩阵的列数
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?