⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 alphaneuron.h

📁 此代码经过大量使用
💻 H
字号:
/***************************************************************************                          alphaneuron.h  -  description                             -------------------    copyright            : (C) 2001 by Matt Grover    email                : mgrover@amygdala.org ***************************************************************************//*************************************************************************** *                                                                         * *   This program is free software; you can redistribute it and/or modify  * *   it under the terms of the GNU General Public License as published by  * *   the Free Software Foundation; either version 2 of the License, or     * *   (at your option) any later version.                                   * *                                                                         * ***************************************************************************/#ifndef ALPHANEURON_H#define ALPHANEURON_H#include <amygdala/neuron.h>#include <amygdala/network.h>/** @class AlphaNeuron alphaneuron.h amygdala/alphaneuron.h  * @brief A neuron based on the area W neurons described in  * the Hopfield-Brody Mus Silicium papers.  *  * The neuron model derives the post-synaptic potential based  * on the pre-synaptic currents. The excitatory current is modeled as  * \f[ I = \frac{1}{\tau_s}exp\left(\frac{-(t + t_\delta)}{\tau_s}\right)\f]  * and the inhibitory current is modeled as the alpha function  * \f[ I = \frac{t + t_\delta}{\tau_{si}^2}  *             exp\left(\frac{-(t + t_\delta)}{\tau_{si}}\right) \f]  * The synaptic time constant, \f$\tau_s\f$ is set to be 4 ms longer in inhibitory  * synapses than in excitatory \f$(\tau_{si} = \tau_s + 4ms)\f$.  * The value set through the API is the excitatory time constant.  * This was done because the longer inhibitory constant is  * needed for the correct functioning of our Mus Silicium implementation.  * Amygdala 0.4 will allow excitatory and inhibitory synaptic time constants  * to be set separately, elliminating the need for this kludge.  * The contribution of each current to the membrane potential can be  * found by integrating the currents over time.  The integration is  * done for AlphaNeuron by the Euler class using Euler's method with  * a 10us time step.  * @see Neuron, BasicNeuron, FastNeuron, Euler.  * @author Matt Grover  */class AlphaNeuron : public Neuron {public:    /** @param neuronId A unique, positive integer that is used     *  to identify the neuron. */    AlphaNeuron(AmIdInt neuronId);    virtual ~AlphaNeuron();    /** Fill a lookup table and return     * a pointer to the first element. Neuron::SetTableDimensions()     * should be called first.     * This is an internal function and should only be called     * by FunctionLookup. This function will be made private or removed     * completely for Amygdala 0.4.     * @param index The index of the table to be initialized.     * @return A pointer to the lookup table (an array of floats). */    virtual float* InitializeLookupTable(int index);    /** This is an internal function and should only be called     * by FunctionLookup.  This function will be either removed     * or made private for Amygdala 0.4.     * @return An array containing any values used to generate     * the lookup tables that were set at runtime.     * @param index     * @param numParams Number of unique parameters (variables) needed     * to generate the lookup table associated with index. */    virtual float* GetTableParams(int index, int& numParams);    /** return "AlphaNeuron".  this is needed for xml tags. */    virtual const char* ClassId() { return "AlphaNeuron"; }protected:    /** Send a spike to this Neuron.   When spikes are     * grouped, this function will only be called once per step, but     * it can be called multiple times otherwise.     * This should only be called from other Neurons or the Network.     * @param inSynapse The synapses that the incoming spikes are crossing.     * (locations of the weights).     * @param inTime Time of input (microseconds).     * @param numSyn Number of synapses that are receiving     * input during the current time step.  The default value     * of 0 indicates that spikes are not being grouped together     * and only a single spike is being passed.     * @see Neuron::SendSpike(), Network::SendDelayedSpikes(). */    virtual void InputSpike(SynapseItr& inSynapse,                            AmTimeInt inTime,                            unsigned int numSyn = 0);    /** Query funcRef to see if a lookup table has already     * been generated for an identical neuron and retrieve     * a pointer to the table if it has.     * This is an internal function and should not be called     * by library users.     * @param funcRef Pointer to a FunctionLookup object. */    virtual int SetLookupTables(FunctionLookup* funcRef);    /** Determine the maximum value of a weight for this neuron and     * set maxScaledWeight to this value. This will be used     * as the multiplication factor to convert to and from the     * normalized weight values that are used in the public     * interface.     * <P>NOTE: This function will be deprecated in version 0.4     * if favor of normalizing PSP curves rather than recalculating     * normalized weights. */    virtual void SetMaxScaledWeight();    float* epspLookup;      // Excitatory table    float* edPspLookup;     // Excitatory derivative table    float* ipspLookup;      // Inhibitory table    float* idPspLookup;     // Inhibitory derivative tableprivate:    unsigned int refPeriod;    bool eTblFilled;    bool iTblFilled;};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -