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

📄 spikingneuron.h

📁 amygdata的神经网络算法源代码
💻 H
字号:
/***************************************************************************                          spikingneuron.h  -  description                             -------------------    copyright            : (C) 2003 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 SPIKINGNEURON_H#define SPIKINGNEURON_H#include <amygdala/neuron.h>#include <amygdala/dendrite.h>#include <amygdala/network.h>#include <vector>namespace Amygdala {class Dendrite;class SpikingNeuronProperties;class NConnector;class Trainer;/** @class SpikingNeuron spikingneuron.h amygdala/spikingneuron.h  * @brief Base class for neurons that can send and recieve spikes * * SpikingNeurons are the basic processing units in Amygdala networks * (InputNeurons can send spikes, but don't do any actual processing). * SpikingNeuron child classes cannot be instantiated directly by users, * but must be created using a NeuronFactory (obtained from Topology). * @see Neuron, NeuronFactory, Topology, FastNeuron, BasicNeuron, AlphaNeuron  * @author Matt Grover <mgrover@amygdala.org> */class SpikingNeuron : public Neuron{    friend class Network;    friend void Network::TimeStep();    template<class synapse, class synapseProperty>    friend class NeuronConnector;    template<class trainer, class trainerProperties>    friend class TrainerFactory;public:    virtual ~SpikingNeuron() = 0;    /** @return Ptr to the neuron's Dendrite      * @see Dendrite */    Dendrite* GetDendrite() const { return dendrite; }    /** @return The current membrane potential for the neuron */    virtual float GetMembranePtnl() const { return membranePtnl; }protected:    /** create a spiking neuron      * @param neuronId the ID this neuron is going to have      * @param props the neuron properties */     SpikingNeuron(AmIdInt neuronId, const SpikingNeuronProperties& props);    //void AddDendrite(Dendrite* dend);    /** Add a new dendrite to the neuron.  This should only be done from Synapse.      * @param trainer the trainer used to train the synapses of this neuron */    virtual void SetTrainer(Trainer* trainer);    /** This is the main processing step.  ProcessInput retrieves     * new input (spikes) from the dendrite, evaluates the neuron's     * state and determines if the neuron will spike.  This should only     * be called from Network.     * @param inTime Current time */    virtual void ProcessInput(const AmTimeInt& inTime) = 0;    /** Scale the lookup table values in order to normalize the      * modeled PSP curve. */    virtual void ScaleFunctionLookups() {}        /** Allows child classes to clean up any vectors or variables     *  after the neuron has spiked. */    virtual void SpikeCleanup() {}    Dendrite* dendrite;    AmTimeInt refPeriod;    /*     * Times are measured in microseconds since the begining     * of the simulation. These will eventually be changed     * to 64-bit integers to allow for longer simulations     * (32-bit integers will roll over after about an hour).     */    AmTimeInt schedSpikeTime;    // time of next scheduled spike    AmTimeInt currTime;          // current simulation time - set in InputSpike()    AmTimeInt inputTime;         // time of last received spike    float membranePtnl;             // u-i (mV)private:    /** Send a spike to all outgoing neurons. This function     * is generally called from Network.  It should not be called     * directly by library users.     * @param now Time of spike. */    void SendSpike(AmTimeInt& now);};} // namespace Amygdala#endif // SPIKINGNEURON_H

⌨️ 快捷键说明

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