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

📄 testdoc.h

📁 C++编写的BP神经网络源程序,标准程序
💻 H
字号:
// testDoc.h : interface of the CTestDoc class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_TESTDOC_H__EFD89CB6_5671_447C_8B60_8AA80A6B09ED__INCLUDED_)
#define AFX_TESTDOC_H__EFD89CB6_5671_447C_8B60_8AA80A6B09ED__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <iostream.h>
#include <fstream.h>
#include <conio.h>
#include <stdlib.h>
#include <math.h>
#include <ctype.h>
#include <stdio.h>
#include <float.h>
#include <time.h>

#define IA   16807
#define IM   2147483647
#define AM   (1.0 / IM)
#define IQ   127773
#define IR   2836
#define NTAB 32
#define NDIV (1+(IM-1) / NTAB)
#define EPS  1.2e-7
#define RNMX (1.0 - EPS)
#define BIAS_FILE "e_system.txt"
#define BIASNUM_FILE "enum_system.txt"

class CTestDoc : public CDocument
{
protected: // create from serialization only
	CTestDoc();
	DECLARE_DYNCREATE(CTestDoc)

// Attributes
public:

double **input,
	**hidden,
	**output,
	**target,
	*bias,
	**weight_i_h,
	**weight_h_o,
	*errorsignal_hidden,
	*errorsignal_output;

int input_array_size,
	hidden_array_size,
	output_array_size,
	max_patterns,
	bias_array_size,
	number_of_input_patterns,
	selpattern,
	ytemp,
	ztemp,
	total,
    count,
	dispmode;

double learning_rate,
	   max_error_tollerance;

BOOL notkeyhit,
	 can_learn,
	 file_loaded,
	 data_learned;

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CTestDoc)
	public:
	virtual BOOL OnNewDocument();
	virtual void Serialize(CArchive& ar);
	//}}AFX_VIRTUAL

// Implementation
public:
	int compare_output_to_target();
	void backward_pass(ofstream& f_out);
	void forward_pass(int pattern);
	void clear_memory();
	void initialize_net();
	virtual ~CTestDoc();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CTestDoc)
	afx_msg void OnMenuLoad();
	afx_msg void OnMenuLearn();
	afx_msg void OnMenuNewfile();
	afx_msg void OnMenuTest();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_TESTDOC_H__EFD89CB6_5671_447C_8B60_8AA80A6B09ED__INCLUDED_)

⌨️ 快捷键说明

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