Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Teem::SpikeDelayLine Class Reference
[Utilities]

#include <SpikeDelayLine.h>

List of all members.


Detailed Description

An helper class to store spikes for a certain duration.


Public Member Functions

 SpikeDelayLine (double theDelay=2.0)
 Delay of the line.
virtual ~SpikeDelayLine ()
 Destructor.
unsigned step (double dt, bool pushSpike)
 Step the delay line.
unsigned setDelay (double theDelay, bool dumpSpikes=true)
 Set a new value for the delay.
double getDelay ()
 Get the current delay.
bool spikeInLine () const
 Returns there is one (or more) spike in the delay line.
unsigned spikeCount () const
 Returns the number of spike in the delay line.

Protected Member Functions

unsigned dumpOldSpikes ()
 Pop all the spikes that are beyond the current delay.

Protected Attributes

double delay
 Length of the delay line.
double totalInterval
 Current total time the in the intervals.
double timeSinceLastSpike
 Time since last spike pushed in the line.
bool spikePresent
 True if spike are in line.
std::queue< double > intervals
 Inter-spike intervals.


Member Function Documentation

unsigned Teem::SpikeDelayLine::dumpOldSpikes  )  [protected]
 

Pop all the spikes that are beyond the current delay.

Returns:
the number of spikes that were removed.

unsigned Teem::SpikeDelayLine::setDelay double  theDelay,
bool  dumpSpikes = true
 

Set a new value for the delay.

In case the delay is reduced, it is possible to dump spikes that are beyond the new delay immediately or to wait for the next time-step. In the last case, the function always returns 0.

Parameters:
theDelay new value for the delay
dumpSpikes should the old spikes be dumped
Returns:
number of spike that are dumped (in case the delay is reduced)

unsigned Teem::SpikeDelayLine::step double  dt,
bool  pushSpike
 

Step the delay line.

Parameters:
dt size of time step.
pushSpike set to true if a spike should be pushed in the line durint this time-step
Returns:
the number of spikes that exit the line during this time-step


The documentation for this class was generated from the following files:
Generated on Mon Oct 24 17:38:29 2005 for Teem by  doxygen 1.4.2