TSynapse.h

Go to the documentation of this file.
00001 // @(#)root/mlp:$Id: TSynapse.h 21922 2008-01-30 13:08:54Z brun $
00002 // Author: Christophe.Delaere@cern.ch   20/07/2003
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2003, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TSynapse
00013 #define ROOT_TSynapse
00014 
00015 #ifndef ROOT_TObject
00016 #include "TObject.h"
00017 #endif
00018 
00019 class TNeuron;
00020 
00021 //____________________________________________________________________
00022 //
00023 // TSynapse
00024 //
00025 // This is a simple weighted bidirectionnal connection between
00026 // two neurons.
00027 // A network is built connecting two neurons by a synapse.
00028 // In addition to the value, the synapse can return the DeDw
00029 //
00030 //____________________________________________________________________
00031 
00032 class TSynapse : public TObject {
00033  public:
00034    TSynapse();
00035    TSynapse(TNeuron*, TNeuron*, Double_t w = 1);
00036    virtual ~TSynapse() {}
00037    void SetPre(TNeuron* pre);
00038    void SetPost(TNeuron* post);
00039    inline TNeuron* GetPre()  const { return fpre; }
00040    inline TNeuron* GetPost() const { return fpost; }
00041    void SetWeight(Double_t w);
00042    inline Double_t GetWeight() const { return fweight; }
00043    Double_t GetValue() const;
00044    Double_t GetDeDw() const;
00045    void SetDEDw(Double_t in);
00046    Double_t GetDEDw() const { return fDEDw; }
00047 
00048  private:
00049    TNeuron* fpre;         // the neuron before the synapse
00050    TNeuron* fpost;        // the neuron after the synapse
00051    Double_t fweight;      // the weight of the synapse
00052    Double_t fDEDw;        //! the derivative of the total error wrt the synapse weight
00053 
00054    ClassDef(TSynapse, 1)  // simple weighted bidirectionnal connection between 2 neurons
00055 };
00056 
00057 #endif

Generated on Tue Jul 5 14:27:39 2011 for ROOT_528-00b_version by  doxygen 1.5.1