📄 anndlg.h
字号:
// ANNDlg.h : header file
//
#if !defined(AFX_ANNDLG_H__B778125B_A6ED_41BA_A0CF_FC314FFE99D1__INCLUDED_)
#define AFX_ANNDLG_H__B778125B_A6ED_41BA_A0CF_FC314FFE99D1__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Matrix.h"
/////////////////////////////////////////////////////////////////////////////
// CANNDlg dialog
class CANNDlg : public CDialog
{
// Construction
public:
// 用于存储输入的样本数据的矩阵
CMatrix m_matrixDataInput;
// 样本的输入层的数值矩阵
CMatrix m_matrixInputLayerValue;
// 输入层到隐含层的权值矩阵
CMatrix m_matrixInputToHideWeight;
// 隐含层的阈值矩阵
CMatrix m_matrixHideLayerThreshold;
// 隐含层到输出层的权值矩阵
CMatrix m_matrixHideToOutputWeight;
// 输出层的阈值矩阵
CMatrix m_matrixOutputLayerThreshold;
// 隐含层的输出值的矩阵
CMatrix m_matrixHideLayerOutput;
// 输出层的输出值的矩阵
CMatrix m_matrixOutputLayerOutput;
// 用来仿真时输入的网络参数矩阵
CMatrix m_matrixSimuNetwork;
// 用来存放仿真数据结果的矩阵
CMatrix m_matrixSimuResult;
// 系统误差
double m_SystemErrorNew;
double m_SystemErrorOld;
void NetworkInit(int nInputLayerNumber,
int nHideLayerNumber,
int nOutputLayerNumber,
CMatrix &matrixDataInput,
CMatrix &matrixInputLayerValue);
void NetworkInit(
int nInputLayerNumber,
int nHideLayerNumber,
int nOutputLayerNumber,
CMatrix &matrixDataInput,
CMatrix &matrixInputLayerValue,
CMatrix &matrixInputToHideWeight,
CMatrix &matrixHideLayerThreshold,
CMatrix &matrixHideToOutputWeight,
CMatrix &matrixOutputLayerThreshold);
bool BPtrain(int nInputLayerNumber,
int nHideLayerNumber,
int nOutputLayerNumber,
double nSystemErrorOld,
double nSystemErrorNew,
double nSystemErrorLevel,
double nSystemError,
double nStep,
UINT nMaxTrainTimes,
UINT nTrainTimes,
DWORD ID_SYSTEM_ERROR,
DWORD ID_TRAIN_TIMES,
HWND hWnd,
CMatrix &matrixDataInput,
CMatrix &matrixInputLayerValue,
CMatrix &matrixInputToHideWeight,
CMatrix &matrixHideLayerThreshold,
CMatrix &matrixHideLayerOutput,
CMatrix &matrixHideToOutputWeight,
CMatrix &matrixOutputLayerOutput,
CMatrix &matrixOutputLayerThreshold);
void ForCalc(int nInputLayerNumber,
int nHideLayerNumber,
int nOutputLayerNumber,
CMatrix &matrixDataInput,
CMatrix &matrixInputLayerValue,
CMatrix &matrixInputToHideWeight,
CMatrix &matrixHideLayerThreshold,
CMatrix &matrixHideLayerOutput,
CMatrix &matrixHideToOutputWeight,
CMatrix &matrixOutputLayerOutput,
CMatrix &matrixOutputLayerThreshold);
void ForCalc (
int nInputLayerNumber,
int nHideLayerNumber,
int nOutputLayerNumber,
CMatrix &matrixDataInput,
CMatrix &matrixInputLayerValue,
CMatrix &matrixInputToHideWeight,
CMatrix &matrixHideLayerThreshold,
CMatrix &matrixHideLayerOutput,
CMatrix &matrixHideToOutputWeight,
CMatrix &matrixOutputLayerOutput,
CMatrix &matrixOutputLayerThreshold,
CMatrix &cMatrixExHideLayerThreshold,
CMatrix &cMatrixExOutputLayerThreshold);
bool SaveConstantStringToFile(CString& strFileName,CString& strConstantData);
void Display(int nInputLayerNumber,
int nOutputLayerNumber,
CMatrix &matrixDataInput,
CMatrix &matrixOutputLayerOutput);
void Display(int nOutputLayerNumber,
CMatrix &matrixOutputLayerOutput);
CANNDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CANNDlg)
enum { IDD = IDD_ANN_DIALOG };
UINT m_nHideLayerNumber;
UINT m_nInputLayerNumber;
UINT m_nMaxTrainTimes;
UINT m_nOutputLayerNumber;
double m_nSystemError;
double m_nSystemErrorLevel;
UINT m_nTrainTimes;
double m_nStep;
CString m_Display;
CString m_strNetWorkPath;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CANNDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CANNDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnButtonTrain();
afx_msg void OnButtonSim();
afx_msg void OnSetSavepath();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_ANNDLG_H__B778125B_A6ED_41BA_A0CF_FC314FFE99D1__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -