#include <SpikingInputNeuron.h>
Public Member Functions | |
SpikingInputNeuron () | |
SpikingInputNeuron (const std::vector< double > &spikeTimes) | |
virtual int | reset (double dt) |
Called at the beginning of a simulation at t=0. | |
virtual int | reset (double dt, double startT) |
virtual int | advance (AdvanceInfo const &) |
Calculate the next state and output/propagate the result to succesors/outgoing objects. | |
void | setSpikes (const std::vector< double > &theSpikeTimes) |
Set the spike times at which the input neuron should fire during the simulation. | |
const std::vector< double > & | getSpikeTimes () const |
void | addSpike (double st, bool force_sort=true) |
Add a single spike time. | |
void | printSpikeTimes (void) |
double | getLastSpikeTime () |
virtual double | getManagedDelay () const |
virtual int | nSpikeInputPorts () const |
virtual int | nSpikeOutputPorts () const |
virtual int | nAnalogInputPorts () const |
virtual int | nAnalogOutputPorts () const |
virtual PortType | outputPortType (port_t o) const |
virtual PortType | inputPortType (port_t i) const |
void | adjustSpikesToTimeGrid (double dt) |
void | sort_spikes () |
Definition at line 13 of file SpikingInputNeuron.h.
SpikingInputNeuron::SpikingInputNeuron | ( | ) |
Definition at line 15 of file SpikingInputNeuron.cpp.
SpikingInputNeuron::SpikingInputNeuron | ( | const std::vector< double > & | spikeTimes | ) | [explicit] |
Definition at line 20 of file SpikingInputNeuron.cpp.
Called at the beginning of a simulation at t=0.
Reimplemented from SimObject.
Definition at line 71 of file SpikingInputNeuron.cpp.
References SingleOutputSpikeSender::reset(), and sort_spikes().
Definition at line 87 of file SpikingInputNeuron.cpp.
References sort_spikes().
int SpikingInputNeuron::advance | ( | AdvanceInfo const & | ) | [virtual] |
Calculate the next state and output/propagate the result to succesors/outgoing objects.
The return value of advance contains several bits of information which can be decoded with the bit masks ADVANCEFLAG_* like ADVANCEFLAG_HASSPIKED and ADVANCEFLAG_DEACTIVATE.
Reimplemented from SimObject.
Definition at line 102 of file SpikingInputNeuron.cpp.
References ADVANCEFLAG_HASSPIKED, AdvanceInfo::dt, Time::in_sec(), SingleOutputSpikeSender::out_port, and SpikeOutputPort::setSpike().
void SpikingInputNeuron::setSpikes | ( | const std::vector< double > & | theSpikeTimes | ) |
Set the spike times at which the input neuron should fire during the simulation.
Definition at line 54 of file SpikingInputNeuron.cpp.
const std::vector< double > & SpikingInputNeuron::getSpikeTimes | ( | void | ) | const |
Definition at line 60 of file SpikingInputNeuron.cpp.
void SpikingInputNeuron::printSpikeTimes | ( | void | ) |
Definition at line 118 of file SpikingInputNeuron.cpp.
double SpikingInputNeuron::getLastSpikeTime | ( | ) | [inline] |
Definition at line 39 of file SpikingInputNeuron.h.
References SingleOutputSpikeSender::out_port, and SpikeOutputPort::spikeTime().
virtual double SpikingInputNeuron::getManagedDelay | ( | ) | const [inline, virtual] |
virtual int SpikingInputNeuron::nSpikeInputPorts | ( | ) | const [inline, virtual] |
virtual int SpikingInputNeuron::nSpikeOutputPorts | ( | ) | const [inline, virtual] |
virtual int SpikingInputNeuron::nAnalogInputPorts | ( | ) | const [inline, virtual] |
virtual int SpikingInputNeuron::nAnalogOutputPorts | ( | ) | const [inline, virtual] |
Reimplemented from SimObject.
Definition at line 46 of file SpikingInputNeuron.h.
References SimObject::spiking, and SimObject::undefined.
Reimplemented from SimObject.
Definition at line 50 of file SpikingInputNeuron.h.
References SimObject::undefined.
void SpikingInputNeuron::adjustSpikesToTimeGrid | ( | double | dt | ) |
Definition at line 40 of file SpikingInputNeuron.cpp.
void SpikingInputNeuron::sort_spikes | ( | ) |