25 class TNeuron :
public TNamed {
26 friend class TSynapse;
29 enum ENeuronType { kOff, kLinear, kSigmoid, kTanh, kGauss, kSoftmax, kExternal };
31 TNeuron(ENeuronType type = kSigmoid,
32 const char* name =
"",
const char* title =
"",
33 const char* extF =
"",
const char* extD =
"" );
35 inline TSynapse* GetPre(Int_t n)
const {
return (TSynapse*) fpre.At(n); }
36 inline TSynapse* GetPost(Int_t n)
const {
return (TSynapse*) fpost.At(n); }
37 inline TNeuron* GetInLayer(Int_t n)
const {
return (TNeuron*) flayer.At(n); }
38 TTreeFormula* UseBranch(TTree*,
const char*);
39 Double_t GetInput()
const;
40 Double_t GetValue()
const;
41 Double_t GetDerivative()
const;
42 Double_t GetError()
const;
43 Double_t GetTarget()
const;
44 Double_t GetDeDw()
const;
45 Double_t GetBranch()
const;
46 ENeuronType GetType()
const;
47 void SetWeight(Double_t w);
48 inline Double_t GetWeight()
const {
return fWeight; }
49 void SetNormalisation(Double_t mean, Double_t RMS);
50 inline const Double_t* GetNormalisation()
const {
return fNorm; }
51 void SetNewEvent()
const;
52 void SetDEDw(Double_t in);
53 inline Double_t GetDEDw()
const {
return fDEDw; }
54 void ForceExternalValue(Double_t value);
55 void AddInLayer(TNeuron*);
58 Double_t Sigmoid(Double_t x)
const;
59 Double_t DSigmoid(Double_t x)
const;
60 void AddPre(TSynapse*);
61 void AddPost(TSynapse*);
64 TNeuron(
const TNeuron&);
65 TNeuron& operator=(
const TNeuron&);
75 TTreeFormula* fFormula;