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

📄 basicspikeoutput.h

📁 amygdata的神经网络算法源代码
💻 H
字号:
/***************************************************************************                          basicspikeoutput.h  -  description                             -------------------    begin                : Tue Aug 7 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 BASICSPIKEOUTPUT_H#define BASICSPIKEOUTPUT_H#include <amygdala/spikeoutput.h>#include <amygdala/outputmanager.h>#include <amygdala/factory.h>#include <string>#include <stdio.h>namespace Amygdala {/** @class BasicSpikeOutput basicspikeoutput.h amygdala/basicspikeoutput.h  * A simple SpikeOutput class that prints out a message when a neuron  * passes a spike event.   * @see SpikeOutput  * @author Matt Grover  */class BasicSpikeOutput : public SpikeOutput  {public:     typedef SpikeOutputFactory<BasicSpikeOutput> Factory;    BasicSpikeOutput();	virtual ~BasicSpikeOutput();		/**	 * Raise an output event.  If output is turned on in streaming mode,	 * this function will be called every time an output neuron spikes.	 */	virtual void OutputEvent(Neuron* nrn, AmTimeInt outputTime);		/**	 * Pass in an output cache.  If output is turned on in caching mode,	 * this function will be called every time the cache is emptied.	 * Arguments TBD.	 */	virtual void OutputCache();    /** Turn on logging   * @param filename The logfile   * @param start simTime when logging starts   * @param end   simTime when logging ends   */    void LogSpikeTimes(std::string filename, AmTimeInt start=0, AmTimeInt end=~0);  /** Close a the file descriptor if open */  void CloseLog();protected:	  /** write logging info to the log file */    void Log(Neuron* nrn, AmTimeInt eventTime);        bool logging;    AmTimeInt logStart;    AmTimeInt logEnd;    FILE *logFd;	friend class OutputManager;};namespace Factory {    static BasicSpikeOutput::Factory MakeBasicSpikeOutput;}} // namespace Amygdala#endif

⌨️ 快捷键说明

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