1 #ifndef CGENERALNEURON_H
2 #define CGENERALNEURON_H
20 virtual double CalcOutput() = 0;
23 virtual double CalcDeriv(
const double input) = 0;
25 virtual double GetNet() = 0;
29 virtual void SetDelta(
const double d) = 0;
31 virtual void SetBias(
const double b) = 0;
35 virtual const std::vector<double> &
GetWeights() = 0;
38 virtual const std::vector<double> &
GetOldDelta() = 0;
45 LastOutput = CalcOutput();
66 #endif // CGENERALNEURON_H
virtual void SetInput(const GeneralLinearCombiner::tinvector &input)
Set pointers to the input.
double GetOutput()
Get the output given the current weights.
virtual double GetNet()=0
Get the net output before application of the activation function.
virtual const std::vector< double > & GetOldDelta()=0
Vector valued delta for the momentum adaptation scheme.
virtual double GetDelta()=0
Get delta for the weight correction formula.
virtual std::vector< double > & SetWeights()=0
virtual double GetBias()=0
Get the bias.
virtual std::vector< double > & SetOldDelta()=0
virtual void SetBias(const double b)=0
Set the bias.
double GetLastOutput()
Get the last result from calling GetOutput, needed during adaptation.
The base class for all neurons in a neural network.
virtual void SetDelta(const double d)=0
Set delta.
virtual const GeneralLinearCombiner::tinvector & GetInput()=0
Get the pointers to the input neurons.
virtual double CalcDeriv(const double input)=0
Calculate the derivative of the activation function, at point input.
virtual const std::vector< double > & GetWeights()=0
Access function for the weights.
std::vector< boost::shared_ptr< GeneralNeuron > > tinvector