library: libMLP #include "TSynapse.h"

# TSynapse

class description - source file - inheritance tree (.pdf)

## class TSynapse : public TObject

| Inheritance Chart:

`TObject`

<-

`TSynapse`

        public:

                          TSynapse()
                          TSynapse(TNeuron*, TNeuron*, Double_t w = 1)
                          TSynapse(const TSynapse&)
                  virtual ~TSynapse()
           static TClass* Class()
                 Double_t GetDeDw() const
                 Double_t GetDEDw() const
                 TNeuron* GetPost() const
                 TNeuron* GetPre() const
                 Double_t GetValue() const
                 Double_t GetWeight() const
          virtual TClass* IsA() const
                TSynapse& operator=(const TSynapse&)
                     void SetDEDw(Double_t in)
                     void SetPost(TNeuron* post)
                     void SetPre(TNeuron* pre)
                     void SetWeight(Double_t w)
             virtual void ShowMembers(TMemberInspector& insp, char* parent)
             virtual void Streamer(TBuffer& b)
                     void StreamerNVirtual(TBuffer& b)

### Data Members

        private:

          TNeuron* fpre     the neuron before the synapse
          TNeuron* fpost    the neuron after the synapse
          Double_t fweight  the weight of the synapse
          Double_t fDEDw    ! the derivative of the total error wrt the synapse weight

## Class Description

     TSynapse

     This is a simple weighted bidirectionnal connection between
     two neurons.
     A network is built connecting two neurons by a synapse.
     In addition to the value, the synapse can return the DeDw

TSynapse()

     Default constructor

TSynapse(TNeuron * pre, TNeuron * post, Double_t w)

     Constructor that connects two neurons

void SetPre(TNeuron * pre)

     Sets the pre-neuron

void SetPost(TNeuron * post)

     Sets the post-neuron

Double_t GetValue() const

     Returns the value: weithted input

Double_t GetDeDw() const

     Computes the derivative of the error wrt the synapse weight.

void SetWeight(Double_t w)

     Sets the weight of the synapse.
     This weight is the multiplying factor applied on the
     output of a neuron in the linear combination given as input
     of another neuron.

void SetDEDw(Double_t in)

     Sets the derivative of the total error wrt the synapse weight

### Inline Functions

                   void ~TSynapse()
               TNeuron* GetPre() const
               TNeuron* GetPost() const
               Double_t GetWeight() const
               Double_t GetDEDw() const
                TClass* Class()
                TClass* IsA() const
                   void ShowMembers(TMemberInspector& insp, char* parent)
                   void Streamer(TBuffer& b)
                   void StreamerNVirtual(TBuffer& b)
               TSynapse TSynapse(const TSynapse&)
              TSynapse& operator=(const TSynapse&)

Author: Christophe.Delaere@cern.ch 21/08/2002
Last update: root/mlp:$Name: $:$Id: TSynapse.cxx,v 1.5 2004/09/29 10:55:55 rdm Exp $
Copyright (C) 1995-2003, Rene Brun and Fons Rademakers. *