5#ifndef SPIKE_FIRINGRATESIMULATION_H
6#define SPIKE_FIRINGRATESIMULATION_H
9#include "Spike/SpikeTrain/SpikeTrain.h"
10#include "Spike/TimeFrame/TimeFrame.h"
81 std::vector<std::vector<double>> spike_trains;
87 [[nodiscard]]
const std::vector<std::vector<double>> &get_spike_trains() {
Implements a simulation during which we calculate the firing rate.
Definition FiringRateSimulation.h:17
TimeFrame time_frame
the time frame
Definition FiringRateSimulation.h:19
SpikeTrain spike_train
the spike train
Definition FiringRateSimulation.h:20
size_t get_firing_rate_size() const
Returns the size of the firing rate array.
Definition FiringRateSimulation.h:58
const TimeFrame & get_time_frame() const
Returns the time frame.
Definition FiringRateSimulation.h:66
void add_to_firing_rate(const std::vector< double > &tmp_firing_rate)
Adds a given vector of firing rate values to the firing_rate array.
Definition FiringRateSimulation.cpp:54
std::unique_ptr< IF > neuron
pointer to an IF neuron
Definition FiringRateSimulation.h:21
size_t N_neurons
number of trials
Definition FiringRateSimulation.h:24
FiringRateSimulation(const std::string &input_file)
Constructs a firing rate simulation from .ini file.
Definition FiringRateSimulation.cpp:13
const std::vector< double > & get_firing_rate() const
Returns the firing rate array.
Definition FiringRateSimulation.h:74
size_t get_N_neurons() const
Returns the number of neurons.
Definition FiringRateSimulation.h:52
std::vector< double > firing_rate
array containing the firing rate values
Definition FiringRateSimulation.h:27
virtual void calculate(int trials)
Calculates the firing rate for a given number of trials.
Definition FiringRateSimulation.cpp:35
std::unique_ptr< Signal > signal
pointer to a signal
Definition FiringRateSimulation.h:22
Definition FiringRateSimulation.h:79
A spike train for discretized times. For a given time discretization with time step dt,...
Definition SpikeTrain.h:18
A time frame with discrete time steps.
Definition TimeFrame.h:13