Base class to all nodes that record traces. More...
#include <tracing_node.h>
Public Types | |
typedef CircularBuffer< double >::const_iterator | const_iterator |
typedef size_t | trace_id |
Public Member Functions | |
TracingNode () | |
virtual | ~TracingNode () |
virtual void | get_status (DictionaryDatum &d) const |
virtual void | set_status (const DictionaryDatum &d) |
void | get_trace_status (DictionaryDatum &d) const |
const_iterator | get_trace (nest::delay steps, trace_id id) const |
Access the trace of id at time step step. More... | |
const_iterator | get_trace (nest::Time const &time, trace_id id) const |
size_t | get_num_traces () const |
Protected Member Functions | |
void | init_traces (size_t num_traces) |
void | set_trace (nest::delay steps, double v, trace_id id=0) |
Base class to all nodes that record traces.
Node that allows to record traces. A trace is a fixed-length buffer that stores the most recent values of a real-valued time-dependent variable, e.g., the neuron's membrane potential. Traces can be read by other nodes or connections. Traces can be accessed using the get_trace() method.
spore::TracingNode::TracingNode | ( | ) |
Constructor.
|
virtual |
Destructor.
|
inline |
|
virtual |
Get status of tracing node.
Reimplemented in spore::PoissonDblExpNeuron, spore::RewardInProxy, and spore::SporeTestNode.
|
inline |
Access the trace of id at time step step.
Get the trace at the given time step. Returns an iterator to a circular buffer that allows to read the trace. Note that neither this function nor the iterator checks for the limits of the trace. Instead values wrap around at the buffer limits. Reading at or beyond ConnectionUpdateManager::get_origin() (which is equal to the slice origin), or values older than ConnectionUpdateManager::get_horizon() will lead to undefined behavior.
steps | the time point to be read. |
id | the index of the trace. |
|
inline |
Convenience function. Time point of trace is passed here as a set::Time object.
time | the time point to be read. |
id | the index of the trace. |
void spore::TracingNode::get_trace_status | ( | DictionaryDatum & | d | ) | const |
Read traces into dictionary.
|
protected |
Constructor.
|
virtual |
Set status of tracing node.
Reimplemented in spore::PoissonDblExpNeuron, spore::RewardInProxy, and spore::SporeTestNode.
|
inlineprotected |
Set value of a trace at the given time point. Values are supposed to be written only in the interval of the current slice.
steps | time to write values to (in steps). |
v | value to be written. |
id | id of the trace (default is 0). |