📄 netiodata.h
字号:
/*************************************************************************** netiodata.h - description ------------------- copyright : (C) 2000 by Matt Grover email : mgrover@amygdala.org ***************************************************************************//*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/#ifndef NETIODATA_H#define NETIODATA_Husing namespace std;#include <vector>/** @class NetIOData netiodata.h amygdala/netiodata.h * @author Matt Grover */class NetIOData {public: NetIOData(int size); virtual ~NetIOData(); /** * Add data about a connection between two neurons. * Return 1 on success. */ virtual int AddSynapse(unsigned int neuronId, unsigned int synapseId, float weight); /** * Return the ID of the first neuron and set an internal * pointer to that neuron. */ virtual unsigned int FirstNeuron(); /** * Return the ID of the next neuron in the sequence and set * an internal pointer to that neuron. */ virtual unsigned int NextNeuron(); /** * Return values for the ID of the first input and its * weight for the current neuron and set an internal pointer. */ virtual int FirstSynapse(unsigned int& synId, float& val); /** * Return values for the ID of the next input and its * weight for the current neuron and set an internal pointer. */ virtual int NextSynapse(unsigned int& synId, float& val);protected: unsigned int netSize; // synapse weight storage struct SynapseData { unsigned int neuronId; float weightVal; }; vector<SynapseData>* synapse; vector<SynapseData> tempSynapse; unsigned int* indexId; unsigned int currNeuronIdx; unsigned int currSynIdx;};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -