?? basicspikeoutput.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 + -