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

fastneuron.h

00001 /***************************************************************************
00002                           fastneuron.h  -  description
00003                              -------------------
00004     begin                : Tue Jan 22 2002
00005     copyright            : (C) 2002 by Matt Grover
00006     email                : mgrover@amygdala.org
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef FASTNEURON_H
00019 #define FASTNEURON_H
00020 
00021 #include <amygdala/neuron.h>
00022 
00035 class FastNeuron : public Neuron  {
00036 public: 
00039     FastNeuron(AmIdInt neuronId);
00040     virtual ~FastNeuron();
00041 
00050     virtual float* InitializeLookupTable(int index);
00051 
00060     virtual float* GetTableParams(int index, int& numParams);
00061 
00063     virtual const char* ClassId() { return "FastNeuron"; }
00064 
00065 protected:
00066     // Functions:
00067 
00080     virtual void InputSpike(SynapseItr& inSynapse,
00081                             AmTimeInt inTime,
00082                             unsigned int numSyn = 0);
00083 
00090     virtual int SetLookupTables(FunctionLookup* funcRef);
00091 
00097     virtual int FillLookupTables(int index);
00098 
00107     virtual void SetMaxScaledWeight();
00108 
00109 private:
00116     inline void PspKernel(float calcTime, float* pspElement);
00117 
00118     /*
00119      * Tables used to cache value of PSP function
00120      * for each time step (number of steps cached is specified by
00121      * pspLSize)
00122      */
00123     float* pspLookup;
00124 
00125     /*
00126      * Index into the begining point of inputHist.  This is used
00127      * to avoid parsing over old and non-contributing input.
00128      */
00129     unsigned int histBgnIdx;
00130 
00131     /*
00132      * The inverse of the step size.  Used in input spike
00133      * rather than dividing by stepSize as an optimization.
00134      */
00135     float stepSizeInv;
00136 };
00137 
00138 #endif

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