#include <SpikeRingBuffer.h>
Public Member Functions | |
SpikeRingBuffer () | |
void | reinit (double dt, double bufferTime) |
Sets up buffer parameters. | |
void | addSpike (double timestamp, double weight) |
Adds spike into the buffer. | |
double | pop (double currTime) |
Advances the buffer one step, returns the current weight. |
This ring buffer handles incoming spikes. It spans an interval equal to the longest arrival delay. When a spike event is notified it puts it into the slot defined by the arrival time. It just adds the weight onto the existing value in this slot, assuming a linear summation of the weights of coincident inputs.
SpikeRingBuffer::SpikeRingBuffer | ( | ) |
void SpikeRingBuffer::addSpike | ( | double | timestamp, | |
double | weight | |||
) |
Adds spike into the buffer.
double SpikeRingBuffer::pop | ( | double | currTime | ) |
Advances the buffer one step, returns the current weight.
void SpikeRingBuffer::reinit | ( | double | dt, | |
double | bufferTime | |||
) |
Sets up buffer parameters.