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

📄 spikeinput.h

📁 amygdata的神经网络算法源代码
💻 H
字号:
/***************************************************************************                          spikeinput.h  -  description                             -------------------    begin                : Wed Aug 8 2001    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 SPIKEINPUT_H#define SPIKEINPUT_H #include <amygdala/neurongroup.h>#include <vector>namespace Amygdala {class Network;class InputNeuron;/** @class SpikeInput spikeinput.h amygdala/spikeinput.h  * The base class for everything that feeds spikes into a network.  * Usually it has to be extended by an application to form the applications  * interface to the Neurons.  * @see SimpleSpikeInput   * @author Matt Grover <mgrover@amygdala.org>  * @author Rudiger Koch <rkoch@rkoch.org>   */class SpikeInput: public NeuronGroup {public:    virtual ~SpikeInput() = 0;    /** Add a neuron to the SpikeInput object */        virtual void AddNeuron(InputNeuron* iNeuron);	/**	 * If streaming input has been turned on in Network, the	 * event loop will call ReadInputBuffer() every time the	 * input spike queue has been emptied.  This should read	 * additional input from some source and add it to the	 * input queue.	 */	virtual void ReadInputBuffer()=0;protected:	SpikeInput();    SpikeInput(const std::string& name);        virtual void AddNeuron(Neuron* nrn);        void SetTime(AmTimeInt now);    void ScheduleQueuedSpikes();    AmTimeInt currTime;    AmTimeInt simStepSize;    struct InSpike {        InputNeuron* inNeuron;        AmTimeInt spikeTime;        bool operator<(const InSpike& is) const        {            return (spikeTime<is.spikeTime);        }    };    std::vector<InSpike> inputSpike;    unsigned int saxErrors;private:    friend class Network;};}  // namespace Amygdala#endif

⌨️ 快捷键说明

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