32 unsigned int newsize = bufferTime / dt;
34 cout <<
"Warning: SpikeRingBuffer::reinit: buffer size too big: " <<
35 newsize <<
" = " << bufferTime <<
" / " <<
36 dt <<
", using " <<
MAXBIN << endl;
40 cout <<
"Warning: SpikeRingBuffer::reinit: buffer size too small: " <<
41 newsize <<
" = " << bufferTime <<
" / " <<
42 dt <<
", using " << 10 << endl;
56 cout <<
"Warning: SpikeRingBuffer: handling spike too late: " <<
57 t <<
" < " <<
currTime_ <<
", using currTime\n";
59 }
else if ( bin >=
MAXBIN ) {
60 cout <<
"Warning: SpikeRingBuffer: bin number exceeds limit: "<<
61 "spikeTime = " << t <<
", currtime= " <<
currTime_ <<
62 ", dt = " <<
dt_ <<
", bin = " << bin <<
" >= " <<
MAXBIN <<
", terminating\n";
double pop(double currTime)
Advances the buffer one step, returns the current weight.
vector< double > weightSum_
void addSpike(double timestamp, double weight)
Adds spike into the buffer.
static const unsigned int MAXBIN
void reinit(double dt, double bufferTime)
Sets up buffer parameters.