Page MenuHomec4science

neurone.hpp
No OneTemporary

File Metadata

Created
Wed, Sep 18, 05:09

neurone.hpp

#include <iostream>
#include <vector>
#include "ringbuffer.hpp"
#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 clock_rest_time_;
/**
* buffer for the neurone (used to manage incoming events)
*/
RingBuffer buffer_;
/**
* external input current
*/
double I_ext_;
public :
/**
* @brief Neurone constructor (the initiation constants are in constant.h)
*/
Neurone();
/**
* @brief Neurone destructor
*/
~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
*/
bool update (unsigned int t);
/**
* @brief set the external input current
*
* @param I new input current
*/
void setIext(double 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
*/
bool Spike(unsigned int t);
/**
* @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;
/**
* provisoire
*/
void receive(int D);
/**
* @brief Return the outside input for the current time
*/
double outsideInput() const;
};
#endif

Event Timeline