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

📄 spikeinput.h

📁 此代码经过大量使用
💻 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_Husing namespace std;#include <amygdala/types.h>#include <vector>/** @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  * @author R黡iger Koch  */class Network;class SpikeInput {public: 	SpikeInput(Network* network);    virtual ~SpikeInput() = 0;	/**	 * Read simple spike vector file.  Replaces	 * NetworkLoader::ReadInputFile()	 */	bool ReadSpikeList(const char* fileName);		/**	 * Read XML file describing spike input patterns.	 */	virtual bool ReadSpikeDef(const char* fileName);		/**	 * 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;	friend class Network;    void ParseSpikeInput(const char *name, const char **attrs);protected:    void SetTime(AmTimeInt now);    void ScheduleQueuedSpikes();    inline void RoundTime(AmTimeInt& time);    unsigned int currTime;    unsigned int simStepSize;    Network* net;    struct InSpike {        AmIdInt neuronId;        AmTimeInt spikeTime;        bool operator<(const InSpike& is) const        {            return (spikeTime<is.spikeTime);        }    };    vector<InSpike> inputSpike;    unsigned int saxErrors;};#endif

⌨️ 快捷键说明

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