MOOSE - Multiscale Object Oriented Simulation Environment
|
#include <SpikeRingBuffer.h>
Public Member Functions | |
void | addSpike (double timestamp, double weight) |
Adds spike into the buffer. More... | |
double | pop (double currTime) |
Advances the buffer one step, returns the current weight. More... | |
void | reinit (double dt, double bufferTime) |
Sets up buffer parameters. More... | |
SpikeRingBuffer () | |
Private Attributes | |
unsigned int | currentBin_ |
double | currTime_ |
double | dt_ |
vector< double > | weightSum_ |
Static Private Attributes | |
static const unsigned int | MAXBIN = 128 |
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.
Definition at line 19 of file SpikeRingBuffer.h.
SpikeRingBuffer::SpikeRingBuffer | ( | ) |
Definition at line 20 of file SpikeRingBuffer.cpp.
void SpikeRingBuffer::addSpike | ( | double | timestamp, |
double | weight | ||
) |
Adds spike into the buffer.
Definition at line 49 of file SpikeRingBuffer.cpp.
References currentBin_, currTime_, dt_, MAXBIN, and weightSum_.
double SpikeRingBuffer::pop | ( | double | currTime | ) |
Advances the buffer one step, returns the current weight.
Definition at line 73 of file SpikeRingBuffer.cpp.
References currentBin_, currTime_, and weightSum_.
void SpikeRingBuffer::reinit | ( | double | dt, |
double | bufferTime | ||
) |
Sets up buffer parameters.
Definition at line 27 of file SpikeRingBuffer.cpp.
References currentBin_, currTime_, dt_, MAXBIN, and weightSum_.
|
private |
Definition at line 35 of file SpikeRingBuffer.h.
Referenced by addSpike(), pop(), and reinit().
|
private |
Definition at line 34 of file SpikeRingBuffer.h.
Referenced by addSpike(), pop(), and reinit().
|
private |
Definition at line 33 of file SpikeRingBuffer.h.
Referenced by addSpike(), and reinit().
|
staticprivate |
Definition at line 32 of file SpikeRingBuffer.h.
Referenced by addSpike(), and reinit().
|
private |
Definition at line 36 of file SpikeRingBuffer.h.
Referenced by addSpike(), pop(), and reinit().