#ifndef ROOT_TNeuron
#define ROOT_TNeuron
#ifndef ROOT_TNamed
#include "TNamed.h"
#endif
#ifndef ROOT_TObjArray
#include "TObjArray.h"
#endif
class TTreeFormula;
class TSynapse;
class TBranch;
class TTree;
class TFormula;
class TNeuron : public TNamed {
friend class TSynapse;
public:
enum ENeuronType { kOff, kLinear, kSigmoid, kTanh, kGauss, kSoftmax, kExternal };
TNeuron(ENeuronType type = kSigmoid,
const char* name = "", const char* title = "",
const char* extF = "", const char* extD = "" );
virtual ~TNeuron() {}
inline TSynapse* GetPre(Int_t n) const { return (TSynapse*) fpre.At(n); }
inline TSynapse* GetPost(Int_t n) const { return (TSynapse*) fpost.At(n); }
inline TNeuron* GetInLayer(Int_t n) const { return (TNeuron*) flayer.At(n); }
TTreeFormula* UseBranch(TTree*, const char*);
Double_t GetInput() const;
Double_t GetValue() const;
Double_t GetDerivative() const;
Double_t GetError() const;
Double_t GetTarget() const;
Double_t GetDeDw() const;
Double_t GetBranch() const;
ENeuronType GetType() const;
void SetWeight(Double_t w);
inline Double_t GetWeight() const { return fWeight; }
void SetNormalisation(Double_t mean, Double_t RMS);
inline const Double_t* GetNormalisation() const { return fNorm; }
void SetNewEvent() const;
void SetDEDw(Double_t in);
inline Double_t GetDEDw() const { return fDEDw; }
void ForceExternalValue(Double_t value);
void AddInLayer(TNeuron*);
protected:
Double_t Sigmoid(Double_t x) const;
Double_t DSigmoid(Double_t x) const;
void AddPre(TSynapse*);
void AddPost(TSynapse*);
private:
TNeuron(const TNeuron&);
TNeuron& operator=(const TNeuron&);
TObjArray fpre;
TObjArray fpost;
TObjArray flayer;
Double_t fWeight;
Double_t fNorm[2];
ENeuronType fType;
TFormula* fExtF;
TFormula* fExtD;
TTreeFormula* fFormula;
Int_t fIndex;
Bool_t fNewInput;
Double_t fInput;
Bool_t fNewValue;
Double_t fValue;
Bool_t fNewDeriv;
Double_t fDerivative;
Bool_t fNewDeDw;
Double_t fDeDw;
Double_t fDEDw;
ClassDef(TNeuron, 4)
};
#endif
Last change: Wed Jun 25 08:49:48 2008
Last generated: 2008-06-25 08:49
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.