CARLsim  6.1.0
CARLsim: a GPU-accelerated SNN simulator
SpikeGeneratorFromVector Class Reference

a SpikeGenerator that schedules spikes from a vector of spike times More...

#include <spikegen_from_vector.h>

Inheritance diagram for SpikeGeneratorFromVector:
[legend]
Collaboration diagram for SpikeGeneratorFromVector:
[legend]

Public Member Functions

 SpikeGeneratorFromVector (std::vector< int > spkTimes)
 SpikeGeneratorFromVector constructor. More...
 
 ~SpikeGeneratorFromVector ()
 PeriodicSpikeGenerator destructor. More...
 
int nextSpikeTime (CARLsim *sim, int grpId, int nid, int currentTime, int lastScheduledSpikeTime, int endOfTimeSlice)
 schedules the next spike time More...
 
- Public Member Functions inherited from SpikeGenerator
virtual ~SpikeGenerator ()
 

Detailed Description

This class implements a SpikeGenerator that schedules spikes from a vector of spike times (ms).

TODO:
change to vector of AER or 2D vector, so that each neuron can have their own spike times.

Definition at line 67 of file spikegen_from_vector.h.

Constructor & Destructor Documentation

◆ SpikeGeneratorFromVector()

SpikeGeneratorFromVector ( std::vector< int >  spkTimes)
Parameters
[in]spkTimesa vector of all spike times

Definition at line 55 of file spikegen_from_vector.cpp.

◆ ~SpikeGeneratorFromVector()

Definition at line 76 of file spikegen_from_vector.h.

Here is the call graph for this function:

Member Function Documentation

◆ nextSpikeTime()

int nextSpikeTime ( CARLsim sim,
int  grpId,
int  nid,
int  currentTime,
int  lastScheduledSpikeTime,
int  endOfTimeSlice 
)
virtual

This function schedules the next spike time, given the currentTime and the lastScheduledSpikeTime. It implements the virtual function of the base class.

Parameters
[in]simpointer to a CARLsim object
[in]grpIdcurrent group ID for which to schedule spikes
[in]nidcurrent neuron ID for which to schedule spikes
[in]currentTimecurrent time (ms) at which spike scheduler is called
[in]lastScheduledSpikeTimethe last time (ms) at which a spike was scheduled for this nid, grpId
Returns
the next spike time (ms)

Implements SpikeGenerator.

Definition at line 63 of file spikegen_from_vector.cpp.

Here is the call graph for this function:

The documentation for this class was generated from the following files: