Main Page | Namespace List | Alphabetical List | Class List | Directories | File List | Class Members | File Members

STDP1Neuron.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   SpikeStream STDP1 Neuron                                              *
00003  *   Copyright (C) 2007 by David Gamez                                     *
00004  *   david@davidgamez.eu                                                   *
00005  *   Version 0.1                                                           *
00006  *                                                                         *
00007  *   This program is free software; you can redistribute it and/or modify  *
00008  *   it under the terms of the GNU General Public License as published by  *
00009  *   the Free Software Foundation; either version 2 of the License, or     *
00010  *   (at your option) any later version.                                   *
00011  *                                                                         *
00012  *   This program is distributed in the hope that it will be useful,       *
00013  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00014  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00015  *   GNU General Public License for more details.                          *
00016  *                                                                         *
00017  *   You should have received a copy of the GNU General Public License     *
00018  *   along with this program; if not, write to the                         *
00019  *   Free Software Foundation, Inc.,                                       *
00020  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00021  ***************************************************************************/
00022 
00023 #ifndef STDP1NEURON_H
00024 #define STDP1NEURON_H
00025 
00026 //SpikeStream includes
00027 #include "Neuron.h"
00028 
00029 //Other includes
00030 #include <string>
00031 using namespace std;
00032 
00033 
00034 //------------------------------ STDP1 Neuron -----------------------------
00035 /*! Neuron based on J.M. Brader, W. Senn and S. Fusi (2006). Learning real
00036         world stimuli in a neural network with spike driven synaptic dynamics. 
00037         Submitted to Neural Computation (2006).
00038         Available at: http://www.ini.unizh.ch/~fusi/papers/bsf05.pdf. */
00039 //-------------------------------------------------------------------------
00040 
00041 class STDP1Neuron : public Neuron {
00042 
00043         public:
00044                 STDP1Neuron();
00045                 ~STDP1Neuron();
00046 
00047                 //Public methods inherited from Neuron
00048                 inline void calculateFinalState();
00049                 inline void changePostSynapticPotential(double amount, unsigned int preSynapticNeuronID);
00050                 inline const string* getDescription();
00051                 string getMonitoringInfo();
00052                 MonitorData* getMonitoringData();
00053                 inline void parametersChanged();
00054                 bool setParameters(map<string, double> paramMap);
00055 
00056 
00057         private:
00058                 //============================== VARIABLES ===================================
00059                 /* --------------------------------------------------------------------------
00060                       Variables controlling the neuron's behaviour are static so that they
00061                                 can be set easily for the whole neuron group.
00062                    --------------------------------------------------------------------------*/
00063 
00064                 /*! Neuron fires when its post synaptic potential crosses this threshold.*/
00065                 static double threshold;
00066 
00067                 /*! Controls the decay rate of the post synaptic potential.*/
00068                 static double membraneTimeConstant_millisec;
00069 
00070                 /*! Neuron cannot fire when it is in its refractory period.*/
00071                 static double refractoryPeriod_millisec;
00072 
00073                 /*! Parameter controlling the relative refractory period.*/
00074                 static double refractoryParam_m;
00075 
00076                 /*! Parameter controlling the relative refractory period.*/
00077                 static double refractoryParam_n;
00078 
00079                 /*! Whether the neuron is in learning mode.*/
00080                 static bool learningMode;
00081 
00082                 /*! Controls the behaviour of the calcuim concentration.
00083                         This is used during learning as a measure of the firing rate of the neuron.*/
00084                 static double calciumIncreaseAmnt;
00085 
00086                 /*! Controls the behaviour of the calcuim concentration.
00087                         This is used during learning as a measure of the firing rate of the neuron.*/
00088                 static double calciumDecayRate; 
00089 
00090                 /*! Limits the degree to which the membrane potential can be hyperpolarized. Otherwise
00091                         an inhibitory layer can increase the polarization without limit, which is not
00092                         biologically realistic and affects the time that the neuron takes to recover
00093                         from inhibition.*/
00094                 static double minPostsynapticPotential;
00095 
00096 
00097                 /* --------------------------------------------------------------------------- 
00098                    ----------------- Variables held within each neuron -----------------------
00099                    ---------------------------------------------------------------------------*/
00100 
00101                 /*! The total post synaptic potential caused by all previous spikes.*/
00102                 double pspTotal;
00103 
00104                 /*! Used for the final calculation, taking account of refractory period etc.*/
00105                 double membranePotential;
00106 
00107                 /*! The current time.*/
00108                 double currentTime;
00109 
00110                 /*! The time since the neuron was last updated.*/
00111                 double lastUpdateTime;
00112         
00113                 /*! The time since the neuron last fired.*/
00114                 double timeSinceLastFire;
00115 
00116                 /*! The previous learning mode. Used to check for learning mode changes.*/
00117                 bool oldLearningMode;
00118 
00119                 /*! Calcium level in the cell
00120                         Used during learning to measure the activity level of the neuron.*/
00121                 double calciumConc;
00122 
00123                 /*! Record when the final state is calculated so that this method can be invoked
00124                         prior to returning monitoring data without calling it twice.*/
00125                 double finalStateUpdateTime;
00126 
00127 
00128                 //============================= METHODS ======================================
00129                 void calculateMembranePotential();
00130                 void printParameters();
00131                 void update();
00132 
00133 };
00134 
00135 
00136 #endif//STDP1NEURON_H
00137 
00138 

Generated on Mon Sep 3 22:33:18 2007 for STDP1 Neuron by  doxygen 1.4.4