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

📄 cmatptr.h

📁 face recognition test source code
💻 H
字号:
#ifndef MATRIXPTR_H
#define MATRIXPTR_H

#include "CMat.h"

class CMatrixPtr : public CMatrix
	{
	private:
		CMemory **pColPtr;							/*Locked pointer of CMatrix's pMem*/
													/*pMem contain the CMemory pointer to the columns of the matrix*/
		CMemory *pMemPtr;							/*Array of memory containing the pointers to the columns' values*/
		valtype2 **pData2;								/*Locked pointer of pMemPtr. So it contains the pointers to the values*/
		BOOL bAlloc;
		
	public:
		CMatrixPtr();
		CMatrixPtr(long l, long c);
		~CMatrixPtr();
		virtual valtype2 GetAt(long l, long c);			/*Get the element at (l,c) of the matrix*/
													/*if bTranspose == FALSE, and of the*/
													/*transposed matrix if bTranspose == TRUE*/
		virtual void SetAt(long l, long c, valtype2 value);
													/*Obvious. Becarful to bTranspose*/
		virtual void Lock();
		virtual void Unlock();
		void SetColumn(long c, CMemory *pCol);
													/*Assign the column c of the matrix to the memory vector pCol*/
		CMemory *GetColumn(long c);					/*Return the column c of the matrix as a CMemory object*/
		virtual void Allocate();					/*Allocate (or reallocate) the memory*/
													/*needed by pData; Call the CMemory's Allocate fct*/
		virtual void Allocate(long, long);			/*set li and col, call Allocate() and AllocateCol()*/
		void AllocateCol();							/*Allocate memory for the coulmns' data*/
		void FreeCol();								/*free the memory for the columns data*/
		void InvertCol();							/*Invert the order of this matrix*/
		void SwapCol(long l1, long l2);				/*Swap the order of two columns*/
		void Discard(long l);						/*Discard a column*/
	};

#endif /*MATRIXPTR_H*/

⌨️ 快捷键说明

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