亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? matrix.h

?? 專家系統(tǒng)-神經(jīng)網(wǎng)絡(luò)代碼
?? H
字號:
/////////////////////////////////////////////////////////////////////////////
// Matrix.h : 
//		Interface of the class CMatrix
// Author : freeia
// Modified Date : 3/11/2003
// E-mail : freeia@163.com
// Company/School : hdcad
/////////////////////////////////////////////////////////////////////////////

#ifndef _MATRIX_H
#define _MATRIX_H

#include <vector>

using namespace std;

typedef vector <double> VDOUBLE;
typedef vector <VDOUBLE> TMatrix;


class __declspec(dllimport) CMatrix  
{	

	/************************************************************************
	*				the interface function of the class CMatrix 			*
	************************************************************************/
public:

	/////////////////////////////////////////////////////////////////////////
	// Construction and Destruction	
	CMatrix();

	CMatrix(CMatrix& cMatrixB);

	virtual ~CMatrix();

	TMatrix	m_pTMatrix;				// 指向矩陣的頭指針

	/////////////////////////////////////////////////////////////////////////
	// According to the parameters nRow & nCol to construct a matrix
	CMatrix(unsigned int nRow, unsigned int nCol);


	/////////////////////////////////////////////////////////////////////////
	// This function initialize the matrix :
	//		the matrix which has been initialized has 0 row & 0 column, and
	// all elements in it is zeros.
	// 
	void Initialize();

	/////////////////////////////////////////////////////////////////////////
	// This function initialize the matrix :
	//		the matrix which has been initialized has 0 row & 0 column, and
	// all elements in it is zeros.
	// 
	void InitializeZero();

	/////////////////////////////////////////////////////////////////////////
	// To make random in the elements of the matrix and the elements of the 
	// matrix has been randomized between -1 and 1.These elements must be
	// decimal fractions.
	// 
	void RandomInitialize();

	/////////////////////////////////////////////////////////////////////////
	// Overload Operations

	// 'CMatrix + CMatrix'
	CMatrix operator + (CMatrix& cMatrixB);	
	// 'CMatrix - CMatrix'
	CMatrix operator - (CMatrix& cMatrixB);	
	// 'CMatrix * CMatrix'
	CMatrix operator * (CMatrix& cMatrixB);	
	// 'CMatrix * int'
	CMatrix operator * (double nValue);	
	// 'CMatrix = CMatrix'
	CMatrix& operator = (CMatrix& cMatrixB);	
	// 'CMatrix += CMatrix'
	CMatrix& operator += (CMatrix& cMatrixB);	
	// 'CMatrix .* CMatrix'
	CMatrix operator / (CMatrix& cMatrixB);	


	/////////////////////////////////////////////////////////////////////////
	// Transpose the matrix
	//
	CMatrix Transpose();

	/////////////////////////////////////////////////////////////////////////
	// Inverse the matrix
	//
	CMatrix Inverse();

	/////////////////////////////////////////////////////////////////////////
	// Load the data from the file and reset the rows and the colums of the 
	// matrix
	//
	bool LoadDataFromFile(CString& strFileName);

	/////////////////////////////////////////////////////////////////////////
	// Save the data from the CMatrix object to the specified file
	//
	bool SaveDataToFile(CString& strFileName);
	
	/////////////////////////////////////////////////////////////////////////
	// Get the matrix Row Number
	//
	unsigned int GetMatrixRowNumber() const
	{
		return m_nRow;
	}

	/////////////////////////////////////////////////////////////////////////
	// Get the matrix Colum Number
	//
	unsigned int GetMatrixColNumber() const
	{
		return m_nCol;
	}


	/////////////////////////////////////////////////////////////////////////////
	// Load the data from the file and reset the rows and the colums of 
	// the matrixes.
	// Parameter:
	//		[in] strFileName
	//		[out]cMatrixInputToHideWeightValue
	//		[out]cMatrixHideLayerValveValue
	//		[out]cMatrixHideToOutputWeightValue
	//		[out]cMatrixOutputLayerValveValue
	//		[out]nInputLayerNumber
	//		[out]nHideLayerNumber
	//		[out]nOutputLayerNumber
	//		[out]nComboArithmetic
	//		[out]nComboFunc
	//
	bool LoadDataFromFileSpecial (	CString& strFileName,
									CMatrix& cMatrixInputToHideWeightValue,
									CMatrix& cMatrixHideLayerValveValue,
									CMatrix& cMatrixHideToOutputWeightValue,
									CMatrix& cMatrixOutputLayerValveValue,
									unsigned int &nInputLayerNumber,
									unsigned int &nHideLayerNumber,
									unsigned int &nOutputLayerNumber,
									int &nComboArithmetic,
									int	&nComboFunc);



	/////////////////////////////////////////////////////////////////////////
	//	Copy data from a vector to a matrix
	//	Parameter:
	//		[out]	cMatrix ----> the returned value
	//		[in]	nIndex	----> the index in vector
	//	Notes:
	//		the object copied must be vector!!!
	//
	void CopySubMatrixFromVector(CMatrix& cMatrix,unsigned int nIndex);

	/////////////////////////////////////////////////////////////////////////
	// Copy data from sub matrix to another matrix
	// Parameter:
	//		[out]	cMatrix ----> 矩陣的子矩陣返回的結(jié)果
	//		[in]	nStartX ----> 子矩陣在矩陣中的起始坐標(biāo),對應(yīng)行,索引從1開始
	//		[in]	nStartY ----> 子矩陣在矩陣中的起始坐標(biāo),對應(yīng)列,索引從1開始
	//
	void CopySubMatrix(CMatrix& cMatrix,unsigned int nStartX,unsigned int nStartY);

	/////////////////////////////////////////////////////////////////////////
	// Copy Matrix
	//	Parameter:
	//		[in]	cMatrix ----> be copied matrix
	//
	void CopyMatrix(CMatrix& cMatrix);

	/////////////////////////////////////////////////////////////////////////
	// 將矩陣的所有的元素按列合成一列
	//	例如:
	//		matrix = [
	//			1	2	3
	//			4	5	6
	//			7	8	9
	//				]
	//		CMatrix cMatrix = matrix.MergeColumnsToColumnVector();
	//		cMatrix = 
	//			[	1
	//				4	
	//				7
	//				2
	//				5
	//				8
	//				3
	//				6
	//				9	]
	//
	CMatrix MergeColumnsToColumnVector();

	/////////////////////////////////////////////////////////////////////////
	// 對矩陣中所有的元素進(jìn)行一次非線性變換:
	//		變換后的值y與變換前的值的關(guān)系是:
	//			y = f(x) = 1 / (1 + exp(-x))	( 0 < f(x) < 1)
	//
	CMatrix Sigmoid();

	/////////////////////////////////////////////////////////////////////////
	// 對矩陣中所有的元素進(jìn)行一次非線性變換:
	//		變換后的值y與變換前的值的關(guān)系是:
	//			y = f'(x) = (1 / (1 + exp(-x)))'	( 0 < f(x) < 1)
	//			  = exp(-x)/((1 + exp(-x))*(1 + exp(-x)))
	//
	CMatrix SigmoidDerivative();


	/////////////////////////////////////////////////////////////////////////
	// 對矩陣中所有的元素進(jìn)行一次非線性變換:
	//		變換后的值y與變換前的值的關(guān)系是:
	//			y = tanh(x) = (1 - exp(-x)) / (1 + exp(-x))
	//					 =  1 - 2 * exp(-x) / (1 + exp(-x))	( -1 < f(x) < 1)
	//
	CMatrix tanh(); 

	/////////////////////////////////////////////////////////////////////////
	// 對矩陣中所有的元素進(jìn)行一次非線性變換:
	//		變換后的值y與變換前的值的關(guān)系是:
	//			y = tanh'(x) = ((1 - exp(-x)) / (1 + exp(-x)))'	( -1 < f(x) < 1)
	//					 = 	2*exp(-x)/((1 + exp(-x))*(1 + exp(-x)))
	//
	CMatrix tanhDerivative();

	/////////////////////////////////////////////////////////////////////////
	// 對矩陣中所有的元素進(jìn)行一次非線性變換:
	//		變換后的值y與變換前的值的關(guān)系是:
	//			y = Tansig(x) = 2 / (1 + exp(-2 * x)) -1
	//
	CMatrix Tansig();

	/////////////////////////////////////////////////////////////////////////
	// 對矩陣中所有的元素進(jìn)行一次非線性變換:
	//		變換后的值y與變換前的值的關(guān)系是:
	//			y = Tansig'(x) = (2 / (1 + exp(-2 * x)) -1)'
	//				= (2 / (1 + exp(-2 * x)) -1) * (2 / (1 + exp(-2 * x)) -1) -1
	//
	CMatrix TansigDerivative();

	/////////////////////////////////////////////////////////////////////////
	// 對矩陣中的元素進(jìn)行一次操作:
	//		使所有行中的相對應(yīng)的列元素相等
	//	Parameter:
	//		nRowIndex	---->	行索引值(the index starts from 0)
	//							以此行做為標(biāo)準(zhǔn),使矩陣中其余的行相對應(yīng)的列的值
	//							與此行相對應(yīng)的列的值相等	
	//
	void MakeAllColumnElementsSameValue(unsigned int nRowIndex);

	/////////////////////////////////////////////////////////////////////////
	// 對矩陣中的元素進(jìn)行一次操作:
	//		使矩陣變?yōu)閱挝魂?	//
	void Eye();

	/////////////////////////////////////////////////////////////////////////
	// Get System Error
	//
	double	GetSystemError() const;

	/////////////////////////////////////////////////////////////////////////
	// Make all the matrix elements to be changed into absolute value
	//
	CMatrix AbsoluteValue();

	/////////////////////////////////////////////////////////////////////////
	// Parameter:
	//		CMatrix& cMatrix:		被拷貝的數(shù)據(jù)源
	//		unsigned int nIndex:	被拷貝的數(shù)據(jù)在對象中的開始索引位置
	// Purpose:
	//		This function will copy all the data of the cMatrix
	// Notes:
	//		The object must be column vector!!!
	//
	void GetMatrixData(CMatrix& cMatrix, unsigned int nIndex);

	/////////////////////////////////////////////////////////////////////////
	// Parameter:
	//		CMatrix& cMatrix:		被填充的矩陣
	//		unsigned int nIndex:	被拷貝的數(shù)據(jù)在對象中的開始索引位置
	// Purpose:
	//		This function will copy part of the object data into cMatrix
	// Notes:
	//		The object must be column vector!!!
	//
	void SetMatrixData(CMatrix& cMatrix, unsigned int nIndex);

	/////////////////////////////////////////////////////////////////////////
	// Parameter:
	//		CMatrix& cMatrix:		被拷貝的數(shù)據(jù)源
	//		unsigned int nIndex:	被拷貝的數(shù)據(jù)在對象中的開始索引位置
	//		unsigned int nRow:		被拷貝的數(shù)據(jù)在被拷貝對象中的行索引(從0開始)
	// Purpose:
	//		This function will copy all the data of the cMatrix
	// Notes:
	//		The object must be column vector!!!
	//
	void GetMatrixRowData(CMatrix& cMatrix, unsigned int nIndex, unsigned int nRow);

	/////////////////////////////////////////////////////////////////////////
	// Parameter:
	//		CMatrix& cMatrix:		被填充的矩陣
	//		unsigned int nIndex:	被拷貝的數(shù)據(jù)在對象中的開始索引位置
	//		unsigned int nRow:		被填充的數(shù)據(jù)在被填充對象中的行索引
	// Purpose:
	//		This function will copy part of the object data to fill the special 
	// row of the cMatrix
	//	Notes:
	//		The object must be column vector!!!
	//
	void SetMatrixRowData(CMatrix& cMatrix, unsigned int nIndex, unsigned int nRow);

	/////////////////////////////////////////////////////////////////////////
	// Get the total value of the matrix
	double GetTotalElementValue();

	/////////////////////////////////////////////////////////////////////////
	// 對矩陣進(jìn)行拓展
	//	實現(xiàn)功能:
	//		對矩陣的列數(shù)進(jìn)行拓展,nTimes是每列拓展的次數(shù)
	//
	void nncpyi(CMatrix &cMatrix, unsigned int nTimes);

	/////////////////////////////////////////////////////////////////////////
	// 對矩陣進(jìn)行拓展
	//	實現(xiàn)功能:
	//		對矩陣的列數(shù)進(jìn)行拓展
	//	matrix =	[ 
	//			1	2	3
	//			4	5	6
	//			7	8	9
	//				]
	//
	//		nncpyd(matrix)	=	[
	//			1	0	0	2	0	0	3	0	0
	//			0	4	0	0	5	0	0	6	0
	//			0	0	7	0	0	8	0	0	9
	//							]
	void nncpyd(CMatrix &cMatrix);

	/////////////////////////////////////////////////////////////////////////
	// 對矩陣進(jìn)行拓展
	//	實現(xiàn)功能:
	//		對矩陣的列數(shù)進(jìn)行拓展,nTimes是每列拓展的次數(shù)
	//	matrix =	[ 
	//			1	2	3
	//			4	5	6
	//			7	8	9
	//				]
	//		nTimes = 2
	//
	//		nncpyd(matrix)	=	[
	//					1	2	3	1	2	3
	//					4	5	6	4	5	6
	//					7	8	9	7	8	9
	//							]
	//
	void nncpy (CMatrix& cMatrix, unsigned int nTimes);



private:

	unsigned int m_nRow;			// 矩陣所擁有的行數(shù)
	unsigned int m_nCol;			// 矩陣所擁有的列數(shù)


	/////////////////////////////////////////////////////////////////////////
	// 注意:
	//		在重新設(shè)置矩陣的行數(shù)和列數(shù)后,矩陣中的元素被重新初始化為0
	/////////////////////////////////////////////////////////////////////////

	/////////////////////////////////////////////////////////////////////////
	// 設(shè)置矩陣的行數(shù)
	//
	void SetMatrixRowNumber(unsigned int nRow);

	/////////////////////////////////////////////////////////////////////////
	// 設(shè)置矩陣的列數(shù)
	//
	void SetMatrixColNumber(unsigned int nCol);

	/////////////////////////////////////////////////////////////////////////
	// 設(shè)置矩陣的行列數(shù)
	//
	void SetMatrixRowAndCol(unsigned int nRow,unsigned int nCol);


	/////////////////////////////////////////////////////////////////////////
	// 交換矩陣的兩行
	//
	void SwapMatrixRow(unsigned int nRow1,unsigned int nRow2);

	/////////////////////////////////////////////////////////////////////////
	// 交換矩陣的兩列
	//
	void SwapMatrixCol(unsigned int nCol1,unsigned int nCol2);


};


/////////////////////////////////////////////////////////////////////////////
// overload operator 'double - CMatrix'
__declspec(dllimport) CMatrix operator - (double nValue,CMatrix& cMatrixB);

/////////////////////////////////////////////////////////////////////////
// 矩陣合并運算符
//	合并規(guī)則:
//		1. 參與合并運算的兩個矩陣的行數(shù)必須相等;
//		2. 參與合并的兩個矩陣的列數(shù)可以不相等;
//		3. 合并后返回的矩陣的行數(shù)與參與合并的矩陣的行數(shù)相等,列數(shù)是參與合并的
//			兩個矩陣的列數(shù)之和;
//
__declspec(dllimport) CMatrix MergeMatrix(CMatrix& cMatrixA,CMatrix& cMatrixB);



#endif // _MATRIX_H

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人av在线一区二区三区| 国产精品欧美久久久久无广告 | 国产精品色眯眯| 欧美理论在线播放| 五月天激情综合| 久久国产精品第一页| 在线观看亚洲精品视频| 成人性生交大片免费看中文| 久久黄色级2电影| 色爱区综合激月婷婷| 久久久www成人免费无遮挡大片| 爽好久久久欧美精品| 日韩一区二区影院| 国产美女一区二区| 亚洲欧美日韩系列| 在线影院国内精品| 老汉av免费一区二区三区| 久久人人爽爽爽人久久久| 97精品电影院| 日韩国产欧美在线视频| 奇米一区二区三区av| 久久狠狠亚洲综合| 91黄色小视频| 久久精品视频在线看| 国产亚洲婷婷免费| 亚洲韩国一区二区三区| 久久草av在线| 欧洲一区二区三区在线| 亚洲视频小说图片| ww亚洲ww在线观看国产| 国产精品人妖ts系列视频| 麻豆精品在线观看| 国产精品久久久久久久久搜平片 | 亚洲精品综合在线| 日韩午夜精品视频| 99精品国产视频| 日本不卡不码高清免费观看| 国产欧美日韩精品一区| 欧美美女一区二区三区| 99re这里只有精品6| 免费高清在线视频一区·| 欧美国产成人在线| 日韩精品中文字幕一区| 色婷婷av一区二区三区gif| 九九视频精品免费| 亚洲一二三四在线| 国产精品高潮呻吟久久| 欧美大度的电影原声| 91久久国产最好的精华液| 懂色av中文一区二区三区| 男女激情视频一区| 亚洲与欧洲av电影| 中文字幕一区二区三区在线观看 | 制服.丝袜.亚洲.中文.综合| 99精品欧美一区二区三区综合在线| 极品美女销魂一区二区三区| 亚洲成a人v欧美综合天堂| 亚洲欧洲日韩一区二区三区| 久久色.com| 日韩女优av电影在线观看| 欧美精品在线一区二区三区| 日本韩国一区二区三区| av激情综合网| 成人a免费在线看| 国产高清精品久久久久| 麻豆久久一区二区| 蜜臂av日日欢夜夜爽一区| 视频一区二区三区中文字幕| 亚洲一区二区不卡免费| 亚洲精品国产一区二区精华液 | 国产传媒日韩欧美成人| 国产最新精品精品你懂的| 美女视频黄频大全不卡视频在线播放 | 另类的小说在线视频另类成人小视频在线| 久久夜色精品一区| 337p亚洲精品色噜噜狠狠| 免费看欧美女人艹b| 综合激情网...| 日韩午夜在线观看视频| 欧美在线不卡视频| 国产美女在线观看一区| 日日噜噜夜夜狠狠视频欧美人| 国产日韩综合av| 日韩欧美国产三级电影视频| 在线亚洲人成电影网站色www| 国产精品性做久久久久久| 日韩精品每日更新| 亚洲精品日产精品乱码不卡| 国产精品―色哟哟| 亚洲国产成人午夜在线一区| 日本道免费精品一区二区三区| 丁香婷婷综合网| 久久国产精品无码网站| 视频一区视频二区中文| 99视频精品免费视频| 国产精品久久久久久久久搜平片 | 激情六月婷婷久久| 日韩欧美黄色影院| 26uuu亚洲综合色欧美 | 久久精品视频在线看| 国产偷国产偷亚洲高清人白洁| 国产日韩高清在线| 自拍av一区二区三区| 一区二区三区成人在线视频| 亚洲成av人片| 国产九色sp调教91| 97精品国产97久久久久久久久久久久| 日本国产一区二区| 欧美成va人片在线观看| 国产精品久久免费看| 天天av天天翘天天综合网| 极品尤物av久久免费看| 色94色欧美sute亚洲13| 91麻豆精品国产91久久久资源速度 | 在线综合视频播放| 国产日产亚洲精品系列| 亚洲综合男人的天堂| 九色porny丨国产精品| 不卡区在线中文字幕| 欧美丰满一区二区免费视频| 欧美极品少妇xxxxⅹ高跟鞋| 一区二区成人在线| 精品综合免费视频观看| 91美女片黄在线观看| 精品国产成人在线影院| 一区二区三区四区激情| 国产激情偷乱视频一区二区三区| 欧美午夜一区二区三区免费大片| 久久久久久久久97黄色工厂| 亚洲国产精品久久艾草纯爱| 国产成人av影院| 宅男在线国产精品| 亚洲精品日韩一| 国产成人8x视频一区二区| 欧美日韩免费高清一区色橹橹 | 国产91露脸合集magnet | 26uuu亚洲综合色| 亚洲国产精品一区二区久久恐怖片| 国产精品一二一区| 日韩一区国产二区欧美三区| 亚洲激情五月婷婷| 99精品在线观看视频| 国产午夜精品一区二区三区四区| 日韩影院免费视频| 在线日韩一区二区| 中文字幕亚洲在| 国产盗摄一区二区三区| 精品久久人人做人人爱| 日日夜夜免费精品视频| 色94色欧美sute亚洲线路二| 国产精品福利影院| 国产91丝袜在线播放0| 久久久久一区二区三区四区| 免费在线看一区| 欧美女孩性生活视频| 亚洲国产综合人成综合网站| 色婷婷综合久久久中文一区二区| 日本一区二区三区免费乱视频| 激情深爱一区二区| 日韩欧美国产午夜精品| 秋霞影院一区二区| 日韩三级电影网址| 奇米影视一区二区三区| 欧美一区二区私人影院日本| 视频一区视频二区在线观看| 欧美军同video69gay| 午夜视频一区二区| 欧美写真视频网站| 天堂在线一区二区| 日韩欧美一区中文| 激情成人午夜视频| 日本一区二区免费在线| av电影一区二区| 亚洲色图视频网| 欧美午夜电影一区| 午夜久久久影院| 日韩欧美一级在线播放| 国产一区福利在线| 欧美激情艳妇裸体舞| 成人国产精品免费网站| 亚洲欧美在线aaa| 在线亚洲人成电影网站色www| 亚洲成人高清在线| 日韩三级伦理片妻子的秘密按摩| 国产一区二区不卡| 亚洲欧美日韩人成在线播放| 欧美在线观看一区二区| 日韩精品视频网| 久久蜜臀中文字幕| 色婷婷亚洲精品| 奇米888四色在线精品| 26uuu久久综合| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 欧美日韩在线一区二区| 日本成人在线看| 欧美国产日韩在线观看| 欧美在线不卡一区| 激情久久五月天| 一区二区三区中文字幕电影| 7777精品伊人久久久大香线蕉完整版 |