#include <LocalDelayMap.h>
Public Types | |
typedef map< delaystep_t, spikegroupid_t > | delaymaptype |
typedef delaymaptype::const_iterator | const_iterator |
Public Member Functions | |
LocalDelayMap () | |
virtual | ~LocalDelayMap () |
void | insert (local_objectid_t localid, delaystep_t delay, spikegroupid_t group) |
Inserts new entry in the map [localid]->(delay,spiketargetgroup). | |
spikegroupid_t | find (local_objectid_t oid, delaystep_t delay) |
Checks if there is an entry for the specified sending object and the delay. | |
const_iterator | beginDelays (local_objectid_t localid) |
Returns a begin iterator which can serve to iterate through all (delay, stg) pairs. | |
const_iterator | endDelays (local_objectid_t localid) |
Returns an end iterator which can serve to iterate through all (delay, stg) pairs. | |
Protected Member Functions | |
void | resize (local_objectid_t localid) |
Protected Attributes | |
vector< delaymaptype > | _map |
For each spike sending object identified by localid, the delay map stores many (delay, spike_target_group) pairs.
For a spiking connection with delay D between object A and object B which are in the same engine, an entry is added in the the map [A]->(D, STG) where the spike target group contains B. If there is already an entry [A]->(D, X) then B is added to X spike target group.
It is used by the SingleThreadSpikeScheduler for scheduling of spikes in the PropagatedSpikeBuffer.
Definition at line 28 of file LocalDelayMap.h.
typedef map<delaystep_t, spikegroupid_t> LocalDelayMap::delaymaptype |
Definition at line 33 of file LocalDelayMap.h.
typedef delaymaptype::const_iterator LocalDelayMap::const_iterator |
Definition at line 36 of file LocalDelayMap.h.
LocalDelayMap::LocalDelayMap | ( | ) | [inline] |
Definition at line 38 of file LocalDelayMap.h.
virtual LocalDelayMap::~LocalDelayMap | ( | ) | [inline, virtual] |
Definition at line 40 of file LocalDelayMap.h.
void LocalDelayMap::insert | ( | local_objectid_t | localid, | |
delaystep_t | delay, | |||
spikegroupid_t | group | |||
) | [inline] |
Inserts new entry in the map [localid]->(delay,spiketargetgroup).
Definition at line 43 of file LocalDelayMap.h.
References _map, and resize().
Referenced by SingleThreadNetwork::addLocalSpikeMessage().
spikegroupid_t LocalDelayMap::find | ( | local_objectid_t | oid, | |
delaystep_t | delay | |||
) |
Checks if there is an entry for the specified sending object and the delay.
Definition at line 3 of file LocalDelayMap.cpp.
References _map, and no_spikegroup.
Referenced by SingleThreadNetwork::addLocalSpikeMessage().
const_iterator LocalDelayMap::beginDelays | ( | local_objectid_t | localid | ) | [inline] |
Returns a begin iterator which can serve to iterate through all (delay, stg) pairs.
Definition at line 56 of file LocalDelayMap.h.
References _map, and resize().
Referenced by SingleThreadSpikeScheduler::scheduleSpike().
const_iterator LocalDelayMap::endDelays | ( | local_objectid_t | localid | ) | [inline] |
Returns an end iterator which can serve to iterate through all (delay, stg) pairs.
Definition at line 63 of file LocalDelayMap.h.
References _map, and resize().
Referenced by SingleThreadSpikeScheduler::scheduleSpike().
void LocalDelayMap::resize | ( | local_objectid_t | localid | ) | [inline, protected] |
Definition at line 71 of file LocalDelayMap.h.
References _map.
Referenced by beginDelays(), endDelays(), and insert().
vector< delaymaptype > LocalDelayMap::_map [protected] |
Definition at line 76 of file LocalDelayMap.h.
Referenced by beginDelays(), endDelays(), find(), insert(), and resize().