Abstract base class for integrate-and-fire (IF) neurons.
More...
#include <IF.h>
|
| IF (const std::string &input_file) |
| Constructs an IF neuron from a .ini file.
|
|
| IF (double mu, double D) |
| Construct an IF neuron from given parameters.
|
|
virtual double | drift (double v) const =0 |
| Calculates the drift of the IF neuron.
|
|
double | diffusion () const |
| Calculates the diffusion of the IF neurons, i.e. sqrt(2D).
|
|
void | get_spikes (SpikeTrain &spike_train) override |
| Obtains spikes by integrating the Langevin equation using an Euler-Maruyama scheme.
|
|
void | get_spikes (Signal &signal, SpikeTrain &spike_train) override |
| Obtains spikes by integrating the Langevin equation using an Euler-Maruyama scheme. Neuron is subject to an applied signal.
|
|
void | get_voltage_curve (const TimeFrame &time, std::vector< double > &v) |
| Calculates the trajectory, i.e. v(t) for a given time frame.
|
|
void | set_mu (double mu_new) |
| Set new mean input current.
|
|
void | set_D (double D_new) |
| Set new diffusion coefficient.
|
|
double | get_D () const |
| Returns the diffusion coefficient.
|
|
virtual void | print (std::ostream &out) const =0 |
| Prints the IF neuron to the outstream.
|
|
|
double | mu |
| mean input current
|
|
double | D |
| diffusion coefficient
|
|
std::random_device | rd |
| random device (seeding)
|
|
std::mt19937 | generator |
| random number generator
|
|
std::normal_distribution< double > | dist |
| normal distribution
|
|
|
std::ostream & | operator<< (std::ostream &out, const IF &neuron) |
| Overloads the << operator, so we can print the neuron.
|
|
Abstract base class for integrate-and-fire (IF) neurons.
◆ IF() [1/2]
Spike::IF::IF |
( |
const std::string & | input_file | ) |
|
|
explicit |
Constructs an IF neuron from a .ini file.
- Parameters
-
input_file | Path to .ini file |
◆ IF() [2/2]
Spike::IF::IF |
( |
double | mu, |
|
|
double | D ) |
Construct an IF neuron from given parameters.
- Parameters
-
mu | Mean input current |
D | Diffusion coefficient |
◆ diffusion()
double Spike::IF::diffusion |
( |
| ) |
const |
Calculates the diffusion of the IF neurons, i.e. sqrt(2D).
- Returns
- Diffusion
◆ drift()
virtual double Spike::IF::drift |
( |
double | v | ) |
const |
|
pure virtual |
◆ get_D()
double Spike::IF::get_D |
( |
| ) |
const |
|
inline |
Returns the diffusion coefficient.
- Returns
- diffusion coefficient
◆ get_spikes() [1/2]
Obtains spikes by integrating the Langevin equation using an Euler-Maruyama scheme. Neuron is subject to an applied signal.
- Parameters
-
signal | Signal |
spike_train | Spike train |
Implements Spike::Neuron.
Reimplemented in Spike::IFAC.
◆ get_spikes() [2/2]
void Spike::IF::get_spikes |
( |
SpikeTrain & | spike_train | ) |
|
|
overridevirtual |
Obtains spikes by integrating the Langevin equation using an Euler-Maruyama scheme.
- Parameters
-
Implements Spike::Neuron.
Reimplemented in Spike::IFAC.
◆ get_voltage_curve()
void Spike::IF::get_voltage_curve |
( |
const TimeFrame & | time, |
|
|
std::vector< double > & | v ) |
Calculates the trajectory, i.e. v(t) for a given time frame.
- Parameters
-
time | Time frame |
v | Voltage array |
◆ print()
virtual void Spike::IF::print |
( |
std::ostream & | out | ) |
const |
|
pure virtual |
◆ set_D()
void Spike::IF::set_D |
( |
double | D_new | ) |
|
|
inline |
Set new diffusion coefficient.
- Parameters
-
D_new | diffusion coefficient |
◆ set_mu()
void Spike::IF::set_mu |
( |
double | mu_new | ) |
|
|
inline |
Set new mean input current.
- Parameters
-
mu_new | new mean input current |
◆ operator<<
std::ostream & operator<< |
( |
std::ostream & | out, |
|
|
const IF & | neuron ) |
|
friend |
Overloads the << operator, so we can print the neuron.
- Parameters
-
out | out stream |
neuron | IF neuron |
- Returns
- out stream
The documentation for this class was generated from the following files:
- /github/workspace/Spike/Neuron/IF.h
- /github/workspace/Spike/Neuron/IF.cpp