Page MenuHomec4science

neurone.hpp
No OneTemporary

File Metadata

Created
Wed, Jul 17, 00:06

neurone.hpp

#include <iostream>
#include <vector>
#ifndef NEURONE_H
#define NEURONE_H
/*!
* @class Neurone
*
* @brief represents a neurone and allows to simulate its life
*/
class Neurone {
private :
/**
* Represents the neurone's membrane potential
*/
double membrane_potential_;
/**
* Used to store the spike times
*/
std::vector<double> spikes_times_;
/**
* Manage the rest time
*/
double rest_time_;
public :
/**
* @brief Neurone constructor (the initiation constants are in constant.h
*/
Neurone();
/**
* @brief update the neurone (change the membrane potential, make it
* spike if the treshold is reached and manage rest time)
*
* @param Input_current the current coming inside the neurone
* @param time_i time of the simulation
*/
void update (double const Input_current, double time_i);
/**
* @brief return the membrane potential
*/
double getMembranePotential () const ;
/**
* @brief Test if the treshold is reached, if it is, make the neurone spike
* and reinitialize the membrane potential. Store the spike's time
*
* @param time_i used to store the spike's time
*/
void Spike(double time_i);
/**
* @brief Test if the neuron is in rest. If it is, subtract an unit of time
* to the rest time
*/
bool isInRest();
/**
* @brief Return all the spike times
*/
std::vector<double> getSpikeTimes() const;
};
#endif

Event Timeline