SpikeStream Library  0.2
WeightlessNeuron.h
Go to the documentation of this file.
00001 #ifndef WEIGHTLESSNEURON_H
00002 #define WEIGHTLESSNEURON_H
00003 
00004 //Qt includes
00005 #include <QHash>
00006 
00007 namespace spikestream {
00008 
00010         class WeightlessNeuron {
00011                  public:
00012                                 WeightlessNeuron(QHash<unsigned int, QList<unsigned int> >& connectionMap, unsigned int id);
00013                                 ~WeightlessNeuron();
00014                                 void addTraining(QByteArray& newData, unsigned int output);
00015                                 QHash<unsigned int, QList<unsigned int> >& getConnectionMap() { return connectionMap; }
00016                                 unsigned int getID() { return id; }
00017                                 int getNumberOfConnections() { return numberOfConnections; }
00018                                 double getFiringStateProbability(unsigned char inPatArr[], int inPatArrLen, int firingState);
00019                                 unsigned int getHammingThreshold() { return hammingThreshold; }
00020                                 QList<unsigned char*> getTrainingData() { return trainingData; }
00021                                 int getTrainingDataLength() { return trainingDataLength; }
00022                                 double getTransitionProbability(const QList<unsigned int>& neurIDList, const QString& x0Pattern, int firingState);
00023                                 void resetTraining();
00024                                 void setGeneralization(double generalization);
00025 
00026                         private:
00027                                 //===================  VARIABLES  ===================
00029                                 unsigned int id;
00030 
00034                                 QHash<unsigned int, QList<unsigned int> > connectionMap;
00035 
00037                                 int numberOfConnections;
00038 
00040                                 QList<unsigned char*> trainingData;
00041 
00043                                 int trainingDataLength;
00044 
00046                                 unsigned int hammingThreshold;
00047 
00048                                 //====================  METHODS  =====================
00049                                 void buildInputPattern(unsigned char inPatArr[], int inPatArrSize, bool selArr[], int selArrSize, QHash<unsigned int, unsigned char>& firingNeuronIndexMap);
00050                                 void printConnectionMap();
00051                                 void printSelectionArray(bool selArr[], int arrSize);
00052                                 void printTraining();
00053                         };
00054 
00055 }
00056 
00057 #endif//WEIGHTLESSNEURON_H
00058 
 All Classes Files Functions Variables Typedefs Defines