00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef NETIODATA_H
00018 #define NETIODATA_H
00019
00020 using namespace std;
00021 #include <vector>
00022
00027 class NetIOData {
00028 public:
00029 NetIOData(int size);
00030 virtual ~NetIOData();
00031
00036 virtual int AddSynapse(unsigned int neuronId, unsigned int synapseId, float weight);
00037
00042 virtual unsigned int FirstNeuron();
00043
00048 virtual unsigned int NextNeuron();
00049
00054 virtual int FirstSynapse(unsigned int& synId, float& val);
00055
00060 virtual int NextSynapse(unsigned int& synId, float& val);
00061
00062 protected:
00063
00064 unsigned int netSize;
00065
00066
00067 struct SynapseData {
00068 unsigned int neuronId;
00069 float weightVal;
00070 };
00071
00072 vector<SynapseData>* synapse;
00073 vector<SynapseData> tempSynapse;
00074 unsigned int* indexId;
00075 unsigned int currNeuronIdx;
00076 unsigned int currSynIdx;
00077 };
00078
00079 #endif