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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? matrix.h

?? 該軟件為BP網絡的仿真軟件
?? 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 ----> 矩陣的子矩陣返回的結果
	//		[in]	nStartX ----> 子矩陣在矩陣中的起始坐標,對應行,索引從1開始
	//		[in]	nStartY ----> 子矩陣在矩陣中的起始坐標,對應列,索引從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();

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

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


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

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

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

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

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

	/////////////////////////////////////////////////////////////////////////
	// 對矩陣中的元素進行一次操作:
	//		使矩陣變為單位陣
	//
	void Eye();

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

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

	/////////////////////////////////////////////////////////////////////////
	// Parameter:
	//		CMatrix& cMatrix:		被拷貝的數據源
	//		unsigned int nIndex:	被拷貝的數據在對象中的開始索引位置
	// 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:	被拷貝的數據在對象中的開始索引位置
	// 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:		被拷貝的數據源
	//		unsigned int nIndex:	被拷貝的數據在對象中的開始索引位置
	//		unsigned int nRow:		被拷貝的數據在被拷貝對象中的行索引(從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:	被拷貝的數據在對象中的開始索引位置
	//		unsigned int nRow:		被填充的數據在被填充對象中的行索引
	// 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();

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

	/////////////////////////////////////////////////////////////////////////
	// 對矩陣進行拓展
	//	實現功能:
	//		對矩陣的列數進行拓展
	//	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);

	/////////////////////////////////////////////////////////////////////////
	// 對矩陣進行拓展
	//	實現功能:
	//		對矩陣的列數進行拓展,nTimes是每列拓展的次數
	//	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;			// 矩陣所擁有的行數
	unsigned int m_nCol;			// 矩陣所擁有的列數


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

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

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

	/////////////////////////////////////////////////////////////////////////
	// 設置矩陣的行列數
	//
	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);

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



#endif // _MATRIX_H

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久亚洲综合色| 日本中文字幕一区二区有限公司| 亚洲黄色免费网站| 精品一区二区三区视频| 欧美伊人久久久久久午夜久久久久| 久久久久国产一区二区三区四区 | 精品国产一区二区三区四区四| 亚洲国产精品激情在线观看| 视频在线观看国产精品| 色婷婷综合久久久久中文一区二区 | 欧美大黄免费观看| 亚洲综合在线视频| 91视视频在线观看入口直接观看www | 成人av免费网站| 日韩欧美中文字幕制服| 亚洲午夜一区二区| 日本丶国产丶欧美色综合| 中文字幕欧美日韩一区| 国产一二三精品| 67194成人在线观看| 亚洲自拍偷拍欧美| 色综合久久久久久久久| 中文字幕永久在线不卡| 国产99久久久国产精品潘金网站| 久久精品久久久精品美女| 99久久国产综合色|国产精品| 久久女同性恋中文字幕| 久久不见久久见中文字幕免费| 337p亚洲精品色噜噜| 五月婷婷色综合| 3atv在线一区二区三区| 美女国产一区二区| 日韩精品一区二区三区中文精品| 麻豆久久久久久| 久久中文字幕电影| 成人手机电影网| 欧美激情在线看| 不卡一区二区三区四区| 亚洲人精品一区| 欧美性大战久久久久久久蜜臀| 夜夜嗨av一区二区三区中文字幕| 色综合久久88色综合天天| 一区二区三区成人| 欧美日韩一区在线观看| 日韩精品国产精品| 精品欧美一区二区在线观看| 极品尤物av久久免费看| 久久精品人人爽人人爽| 99视频热这里只有精品免费| 亚洲乱码国产乱码精品精的特点 | 东方aⅴ免费观看久久av| 中文字幕欧美区| 99久久免费精品高清特色大片| 亚洲欧美一区二区三区久本道91 | 日本欧美久久久久免费播放网| 日韩一区二区三区高清免费看看| 免播放器亚洲一区| 国产日韩欧美高清| 91福利在线看| 精品中文字幕一区二区| 国产精品美女久久久久久久 | 亚洲成人在线免费| 精品国产免费久久| 色老汉一区二区三区| 日韩在线一区二区三区| 中文字幕欧美国产| 欧美日韩黄色影视| 国产精品一区二区男女羞羞无遮挡| 亚洲色欲色欲www| 欧美日本精品一区二区三区| 麻豆精品在线观看| 一区二区三区欧美日| 精品国产91乱码一区二区三区| 成人app下载| 蜜臀av在线播放一区二区三区| 国产精品全国免费观看高清| 678五月天丁香亚洲综合网| 成人av动漫在线| 久国产精品韩国三级视频| 中文字幕亚洲精品在线观看| 欧美一区二区视频免费观看| www.在线成人| 国产一区二区在线电影| 天天操天天色综合| 国产精品人成在线观看免费| 日韩欧美综合一区| 欧美视频你懂的| 色综合久久久久综合体桃花网| 久久疯狂做爰流白浆xx| 日韩在线卡一卡二| 曰韩精品一区二区| 国产精品国产精品国产专区不蜜 | 捆绑调教一区二区三区| 亚洲伊人色欲综合网| 国产精品久久久久7777按摩 | 日韩精品专区在线影院重磅| 色综合一区二区| 欧美日韩国产a| 成人性生交大片免费看中文| 久久99国内精品| 婷婷国产在线综合| 一区二区三区不卡在线观看| 中文字幕中文字幕一区二区| 久久婷婷色综合| 日韩免费电影网站| 欧美刺激脚交jootjob| 欧美日韩一级片在线观看| 91美女在线视频| 99久久99精品久久久久久 | 国内久久精品视频| 日本sm残虐另类| 午夜精品福利在线| 日韩在线一区二区三区| 三级欧美在线一区| 日韩在线观看一区二区| 日本少妇一区二区| 美女国产一区二区三区| 精品写真视频在线观看| 精品一区二区三区不卡| 国产一区二区三区视频在线播放| 毛片av一区二区| 久久超碰97中文字幕| 国产一区不卡视频| 国产精品1区2区3区| 成人午夜免费视频| 色偷偷成人一区二区三区91| 欧美自拍偷拍一区| 欧美日韩一区二区三区高清| 欧美精品乱码久久久久久| 日韩一区二区三区精品视频| 久久精品男人天堂av| 国产日韩欧美高清| 夜夜嗨av一区二区三区四季av| 午夜精彩视频在线观看不卡| 丝袜国产日韩另类美女| 精品一区在线看| 粉嫩aⅴ一区二区三区四区| 91视频国产观看| 欧美日韩国产小视频在线观看| 欧美一区二区三区四区高清| 久久精品视频在线看| 亚洲一区二区三区四区五区黄| 日本不卡一区二区三区高清视频| 精品一区二区三区免费视频| 99视频国产精品| 在线播放国产精品二区一二区四区| 欧美一区二区三区电影| 中文字幕一区二区三区蜜月| 亚洲综合色噜噜狠狠| 精久久久久久久久久久| kk眼镜猥琐国模调教系列一区二区 | 成人久久久精品乱码一区二区三区| 岛国一区二区在线观看| 欧美伊人久久久久久久久影院| 精品少妇一区二区三区在线视频| 国产精品理论在线观看| 日韩av午夜在线观看| 99re热视频这里只精品| 日韩欧美精品在线| 亚洲免费观看高清在线观看| 韩国欧美国产1区| 欧美日韩一区久久| 综合久久久久久久| 狠狠色伊人亚洲综合成人| 欧美色涩在线第一页| 国产欧美精品区一区二区三区| 久久久精品日韩欧美| 亚洲国产日韩a在线播放| 成人黄色小视频在线观看| 在线电影院国产精品| 一区二区在线观看视频在线观看| 国产精品99久久久久久久女警| 欧美日韩成人在线一区| 亚洲欧美视频在线观看视频| 国产a区久久久| 欧美成人免费网站| 亚洲大片免费看| 91福利在线看| 亚洲人成影院在线观看| 国产99久久久久久免费看农村| 欧美电影免费观看高清完整版在线 | 国产欧美视频一区二区| 三级成人在线视频| 91亚洲精品久久久蜜桃| 中文字幕 久热精品 视频在线 | 久久伊人蜜桃av一区二区| 天天色天天操综合| 欧美午夜寂寞影院| 亚洲免费观看高清| 99re这里只有精品首页| 中文字幕免费不卡| 国产一区二区三区美女| 精品久久久久久最新网址| 日本vs亚洲vs韩国一区三区二区 | 狠狠v欧美v日韩v亚洲ⅴ| 3751色影院一区二区三区| 日韩激情在线观看| 91精品国产综合久久香蕉的特点| 亚洲精品中文字幕乱码三区 | 亚洲免费在线播放|