📄 matrix.h
字号:
// Matrix.h: interface for the CMatrix class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_MATRIX_H__8FC17A77_A602_40FB_A1D1_05958784C8E6__INCLUDED_)
#define AFX_MATRIX_H__8FC17A77_A602_40FB_A1D1_05958784C8E6__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Matrix.h"
#include "Vector.h"
#include <fstream.h>
class CVector;
class CMatrix
{
public:
CMatrix StandardNonLinear();
void exchange(CVector& pr,CVector& pk,int col) ; //交换增广矩阵A的r行k行的函数,pr:r行首地址,pk:k行首地址
CVector ColMax();
void FreeSpace();
CMatrix(int rows=1,int cols=1,bool browvector=true);
CMatrix(const CMatrix &M);
void DeleteCol(int c);
void DeleteRow(int r);
CMatrix ProduceMatrix( CMatrix b);
void Resize(int nv,int ne);
int GetCols();
int GetRows();
CMatrix CaclCov();//协差阵
void Unit();//单位矩阵
CMatrix Inverse();// 求逆
CMatrix Transpos();//求转置
CMatrix Standard();// 标准化
CMatrix operator +(const CMatrix &M);
CMatrix operator -(const CMatrix &M);
CVector operator *(const CVector &V);
CMatrix operator *( const double &n);
CMatrix &operator =(const CMatrix &M);
CMatrix &operator =(const CVector &M);
CMatrix operator *(const CMatrix &M);
CVector &operator [](int index);
virtual ~CMatrix();
friend ifstream & operator >>(ifstream &in,CMatrix &M);
friend ofstream & operator <<(ofstream &out,CMatrix &M);
friend ostream & operator <<(ostream &out,CMatrix &M);
friend class CPls;
friend class CDosc;
friend class CVector;
friend class COscPls;
private:
int m_nv;// number of vectors
int m_ne;// number of elems in vector
bool m_browvector;
CVector *m_val;// value arrage in vector
};
#endif // !defined(AFX_MATRIX_H__8FC17A77_A602_40FB_A1D1_05958784C8E6__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -