Spike
Loading...
Searching...
No Matches
Spike::FiringRateSimulation Class Reference

Implements a simulation during which we calculate the firing rate. More...

#include <FiringRateSimulation.h>

Public Member Functions

 FiringRateSimulation (const std::string &input_file)
 Constructs a firing rate simulation from .ini file.
 
virtual void calculate (int trials)
 Calculates the firing rate for a given number of trials.
 
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.
 
size_t get_N_neurons () const
 Returns the number of neurons.
 
size_t get_firing_rate_size () const
 Returns the size of the firing rate array.
 
const TimeFrameget_time_frame () const
 Returns the time frame.
 
const std::vector< double > & get_firing_rate () const
 Returns the firing rate array.
 

Protected Attributes

TimeFrame time_frame
 the time frame
 
SpikeTrain spike_train
 the spike train
 
std::unique_ptr< IFneuron
 pointer to an IF neuron
 
std::unique_ptr< Signalsignal
 pointer to a signal
 
size_t N_neurons
 number of trials
 
std::vector< double > firing_rate
 array containing the firing rate values
 

Detailed Description

Implements a simulation during which we calculate the firing rate.

Constructor & Destructor Documentation

◆ FiringRateSimulation()

Spike::FiringRateSimulation::FiringRateSimulation ( const std::string & input_file)
explicit

Constructs a firing rate simulation from .ini file.

Parameters
input_filePath to .ini file

Member Function Documentation

◆ add_to_firing_rate()

void Spike::FiringRateSimulation::add_to_firing_rate ( const std::vector< double > & tmp_firing_rate)

Adds a given vector of firing rate values to the firing_rate array.

Parameters
tmp_firing_rateVector containing values of the firing rate

◆ calculate()

void Spike::FiringRateSimulation::calculate ( int trials)
virtual

Calculates the firing rate for a given number of trials.

Parameters
trials

◆ get_firing_rate()

const std::vector< double > & Spike::FiringRateSimulation::get_firing_rate ( ) const
inline

Returns the firing rate array.

Returns
firing rate array

◆ get_firing_rate_size()

size_t Spike::FiringRateSimulation::get_firing_rate_size ( ) const
inline

Returns the size of the firing rate array.

Returns
size of firing rate array

◆ get_N_neurons()

size_t Spike::FiringRateSimulation::get_N_neurons ( ) const
inline

Returns the number of neurons.

Returns
number of neurons

◆ get_time_frame()

const TimeFrame & Spike::FiringRateSimulation::get_time_frame ( ) const
inline

Returns the time frame.

Returns
time frame

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