neuralnetworkplatform.h

来自「使用神经网络开发包实现图形化的神经网络模拟」· C头文件 代码 · 共 60 行

H
60
字号
// NeuronNetwork.h: interface for the NeuronNetwork class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_NEURONNETWORK_H__D3FF2E10_41DF_4D1B_9920_8A489D5993DB__INCLUDED_)
#define AFX_NEURONNETWORK_H__D3FF2E10_41DF_4D1B_9920_8A489D5993DB__INCLUDED_

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

#include"NeuralNode.h"

class NeuralNetworkPlatform :public CObject
{
public:
	bool neuralCheckPosition();
	bool deleteLine(CDC *pDC,CRect rect);
	bool deleteNeuron(CDC *pDC,CRect rect);
	void networkResult(CString inputFileName,CString outputFileName);
	vector<NeuralNode>& getNeuralContainer();
	vector<int>& getLayerNeurons();
	virtual void Serialize(CArchive& ar);
	DECLARE_SERIAL(NeuralNetworkPlatform)
	void neuralRedraw(CDC *pDC,CRect rect);
	int getLayerNum();
	void setCurrentWeight(real newWeight);
	void setCurrectFunction(ActivationFunction newFunction);
	void setCurrentBias(real newBias);
	void neuronRSelected(CPoint point,CDC *pDC,CRect rect);
	void neuronReleased(CDC *pDC,CPoint point,CRect rect);
	void neuronMove(CDC *pDC,CPoint point);
	void neuronSelected(CDC *pDC,CPoint point);
	void drawNeuron(CDC *pDC);
	bool networkTrain(CString fileName,int maxStep,float learnRate);
	bool insertIndex();
	bool insertNode(CPoint pos);
	NeuralNetworkPlatform();
	virtual ~NeuralNetworkPlatform();

private:

	CPoint linePosTemp;
	CPoint neuralPosTemp;
	CPoint mousePosTemp;
	
	int btnPosType;
	int layerNum;				//层数不算第一层
	int neuralNum;				//神经元数目

	vector<int> layerNeurons;
	vector<NeuralNode> neuralContainer;
	vector<NeuralNode>::iterator iter;

	TrainingSet * trainSet;
	MultiLayerNetwork * multiNet;
};

#endif // !defined(AFX_NEURONNETWORK_H__D3FF2E10_41DF_4D1B_9920_8A489D5993DB__INCLUDED_)

⌨️ 快捷键说明

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