Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members  

basicneuron.h

00001 /***************************************************************************
00002                           basicneuron.h  -  description
00003                              -------------------
00004     copyright            : (C) 2000, 2001, 2002 by Matt Grover
00005     email                : mgrover@amygdala.org
00006  ***************************************************************************/
00007 
00008 /***************************************************************************
00009  *                                                                         *
00010  *   This program is free software; you can redistribute it and/or modify  *
00011  *   it under the terms of the GNU General Public License as published by  *
00012  *   the Free Software Foundation; either version 2 of the License, or     *
00013  *   (at your option) any later version.                                   *
00014  *                                                                         *
00015  ***************************************************************************/
00016 
00017 /***************************************************************************
00018     This is a default implementation of a Neuron to be used if the Neuron
00019     class is turned into an abstract base class.  This does nothing at
00020     this time.
00021 ***************************************************************************/
00022 #ifndef BASICNEURON_H
00023 #define BASICNEURON_H
00024 
00025 #include <amygdala/neuron.h>
00026 
00039 class BasicNeuron : public Neuron  {
00040 public: 
00041     BasicNeuron(AmIdInt neuronId);
00042     virtual ~BasicNeuron();
00043 
00052     virtual float* InitializeLookupTable(int index);
00053 
00062     virtual float* GetTableParams(int index, int& numParams);
00063 
00065     virtual const char* ClassId() { return "BasicNeuron"; }
00066 
00067 protected:
00068     // Functions:
00069 
00082     virtual void InputSpike(SynapseItr& inSynapse,
00083                             AmTimeInt inTime,
00084                             unsigned int numSyn = 0);
00085 
00092     virtual int SetLookupTables(FunctionLookup* funcRef);
00093 
00099     virtual int FillLookupTables(int index);
00100 
00109     virtual void SetMaxScaledWeight();
00110 
00111 private:
00117     inline void PspKernel(float calcTime, float* pspElement);
00118 
00122     inline void DPspKernel(float calcTime, float* dPspElement);
00123 
00132     inline void CalcState(float& state, float& deriv,
00133                           const AmTimeInt& calcTime,
00134                           const AmTimeInt& historySize);
00135 
00136     /*
00137      * Tables used to cache value of PSP function and its derivative
00138      * for each time step (number of steps cached is specified by
00139      * pspLSize)
00140      */
00141     float* pspLookup;
00142     float* dPspLookup;
00143 
00144     friend class Network;
00145 };
00146 
00147 #endif

Generated on Wed Sep 4 02:30:34 2002 for Amygdala by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002