Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TSynapse.h
Go to the documentation of this file.
1 // @(#)root/mlp:$Id$
2 // Author: Christophe.Delaere@cern.ch 20/07/2003
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2003, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TSynapse
13 #define ROOT_TSynapse
14 
15 #include "TObject.h"
16 
17 class TNeuron;
18 
19 
20 class TSynapse : public TObject {
21  public:
22  TSynapse();
23  TSynapse(TNeuron*, TNeuron*, Double_t w = 1);
24  virtual ~TSynapse() {}
25  void SetPre(TNeuron* pre);
26  void SetPost(TNeuron* post);
27  inline TNeuron* GetPre() const { return fpre; }
28  inline TNeuron* GetPost() const { return fpost; }
29  void SetWeight(Double_t w);
30  inline Double_t GetWeight() const { return fweight; }
31  Double_t GetValue() const;
32  Double_t GetDeDw() const;
33  void SetDEDw(Double_t in);
34  Double_t GetDEDw() const { return fDEDw; }
35 
36  private:
37  TNeuron* fpre; ///< the neuron before the synapse
38  TNeuron* fpost; ///< the neuron after the synapse
39  Double_t fweight; ///< the weight of the synapse
40  Double_t fDEDw; ///<! the derivative of the total error wrt the synapse weight
41 
42  ClassDef(TSynapse, 1) ///< simple weighted bidirectional connection between 2 neurons
43 };
44 
45 #endif