Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:12:28

0001 // @(#)root/mlp:$Id$
0002 // Author: Christophe.Delaere@cern.ch   20/07/2003
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2003, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TSynapse
0013 #define ROOT_TSynapse
0014 
0015 #include "TObject.h"
0016 
0017 class TNeuron;
0018 
0019 
0020 class TSynapse : public TObject {
0021  public:
0022    TSynapse();
0023    TSynapse(TNeuron*, TNeuron*, Double_t w = 1);
0024    ~TSynapse() override {}
0025    void SetPre(TNeuron* pre);
0026    void SetPost(TNeuron* post);
0027    inline TNeuron* GetPre()  const { return fpre; }
0028    inline TNeuron* GetPost() const { return fpost; }
0029    void SetWeight(Double_t w);
0030    inline Double_t GetWeight() const { return fweight; }
0031    Double_t GetValue() const;
0032    Double_t GetDeDw() const;
0033    void SetDEDw(Double_t in);
0034    Double_t GetDEDw() const { return fDEDw; }
0035 
0036  private:
0037    TNeuron* fpre;         ///< the neuron before the synapse
0038    TNeuron* fpost;        ///< the neuron after the synapse
0039    Double_t fweight;      ///< the weight of the synapse
0040    Double_t fDEDw;        ///<! the derivative of the total error wrt the synapse weight
0041 
0042    ClassDefOverride(TSynapse, 1)  ///< simple weighted bidirectional connection between 2 neurons
0043 };
0044 
0045 #endif