Added makefile to project; Removed error in code;
[povnn.git] / neuron.h
blob11e8fe39d6100dd828f0ac7a7d633351d1f2bfb2
1 #ifndef NEURON_H
2 #define NEURON_H
4 #include <QVector>
5 #include <QHash>
6 #include "neuralinput.h"
8 class Neuron : public NeuralInput
10 Q_OBJECT
12 private:
13 unsigned int type;
14 unsigned int learningType;
15 double threshold;
16 double newValue;
17 double value;
18 double correctSum;
19 unsigned int correctCount;
20 double error;
21 QVector<NeuralInput*> inputs;
22 QHash<NeuralInput*, double> weights;
24 public:
25 static const unsigned int typeStandart = 0;
27 static const unsigned int learningTypeStandart = 0;
29 Neuron(unsigned int type, double threshold = 0);
30 ~Neuron();
31 void addInput(NeuralInput *input, double weight);
32 void removeInput(NeuralInput *input);
33 void calculate();
34 void endCalculate();
35 void learn();
36 void endLearn();
37 double getValue();
38 void setCorrectValue(double value);
41 #endif // NEURON_H