Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-02 08:48:23

0001 /*
0002  * NeuralNetworkNeuron.h
0003  *
0004  *  Created on: Apr 23, 2016
0005  *      Author: Pawel Sznajder
0006  */
0007 
0008 #ifndef NEURALNETWORKNEURON_H_
0009 #define NEURALNETWORKNEURON_H_
0010 
0011 #include <string>
0012 
0013 namespace NumA {
0014 
0015 class NeuralNetworkCell;
0016 
0017 class NeuralNetworkNeuron {
0018 
0019 public:
0020 
0021     NeuralNetworkNeuron();
0022     NeuralNetworkNeuron(NeuralNetworkCell* const NeuralNetworkCellIn,
0023             NeuralNetworkCell* const NeuralNetworkCellOut);
0024     NeuralNetworkNeuron(const NeuralNetworkNeuron& other);
0025     virtual ~NeuralNetworkNeuron();
0026     virtual NeuralNetworkNeuron* clone() const;
0027     virtual std::string toString() const;
0028 
0029     double getWeight() const;
0030     void setWeight(double weight);
0031 
0032     void fixWeight();
0033     void releaseWeight();
0034     bool isWeightFixed() const;
0035 
0036     NeuralNetworkCell* getNeuralNetworkCellIn() const;
0037     void setNeuralNetworkCellIn(NeuralNetworkCell* cell);
0038     NeuralNetworkCell* getNeuralNetworkCellOut() const;
0039     void setNeuralNetworkCellOut(NeuralNetworkCell* cell);
0040 
0041 private:
0042 
0043     double m_weight;
0044     bool m_fixedWeight;
0045     NeuralNetworkCell* m_neuralNetworkCellIn;
0046     NeuralNetworkCell* m_neuralNetwokCellOut;
0047 };
0048 
0049 }
0050 
0051 #endif /* NEURALNETWORKNEURON_H_ */