Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
17class TNeuron;
18
19
20class TSynapse : public TObject {
21 public:
22 TSynapse();
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
double Double_t
Definition RtypesCore.h:59
#define ClassDef(name, id)
Definition Rtypes.h:325
This class describes an elementary neuron, which is the basic element for a Neural Network.
Definition TNeuron.h:25
Mother of all ROOT objects.
Definition TObject.h:37
This is a simple weighted bidirectional connection between two neurons.
Definition TSynapse.h:20
TNeuron * fpre
the neuron before the synapse
Definition TSynapse.h:37
void SetPre(TNeuron *pre)
Sets the pre-neuron.
Definition TSynapse.cxx:53
Double_t GetDeDw() const
Computes the derivative of the error wrt the synapse weight.
Definition TSynapse.cxx:89
TNeuron * fpost
the neuron after the synapse
Definition TSynapse.h:38
void SetPost(TNeuron *post)
Sets the post-neuron.
Definition TSynapse.cxx:66
Double_t fDEDw
! the derivative of the total error wrt the synapse weight
Definition TSynapse.h:40
Double_t fweight
the weight of the synapse
Definition TSynapse.h:39
void SetWeight(Double_t w)
Sets the weight of the synapse.
Definition TSynapse.cxx:102
Double_t GetValue() const
Returns the value: weighted input.
Definition TSynapse.cxx:79
TNeuron * GetPost() const
Definition TSynapse.h:28
Double_t GetWeight() const
Definition TSynapse.h:30
void SetDEDw(Double_t in)
Sets the derivative of the total error wrt the synapse weight.
Definition TSynapse.cxx:110
TNeuron * GetPre() const
Definition TSynapse.h:27
virtual ~TSynapse()
Definition TSynapse.h:24
Double_t GetDEDw() const
Definition TSynapse.h:34
TSynapse()
Default constructor.
Definition TSynapse.cxx:29