SpikeTimeRecorder.cpp

Go to the documentation of this file.
00001 #include "SpikeTimeRecorder.h"
00002 
00003 #include <iostream>
00004 using std::cout;
00005 using std::cerr;
00006 using std::endl;
00007 
00008 SpikeTimeRecorder::SpikeTimeRecorder()
00009 {
00010     spikes.resize( 0 );
00011 }
00012 
00013 void SpikeTimeRecorder::printSpikeTimes(void)
00014 {
00015     for( size_t i=0; i<spikes.size(); i++) {
00016         cout << spikes[i] << " ";
00017     }
00018     cout << endl;
00019 }
00020 
00021 
00022 int SpikeTimeRecorder::reset( double dt )
00023 {
00024     spikes.resize( 0 );
00025     return 0;
00026 }
00027 
00028 int SpikeTimeRecorder::spikeHit( spikeport_t port, SpikeEvent const& spike )
00029 {
00030     spikes.push_back( spike.time() );
00031     return 0;
00032 }
00033 
00034 const vector<double> & SpikeTimeRecorder::getSpikeTimes(void) const
00035 {
00036     return spikes;
00037 }
00038 
00039 size_t SpikeTimeRecorder::spikeCount() const
00040 {
00041         return spikes.size();
00042 }
00043 
00044 vector<double> & SpikeTimeRecorder::spikeVec(void)
00045 {
00046     return spikes;
00047 }

Generated on Wed Jul 9 16:34:39 2008 for PCSIM by  doxygen 1.5.5