Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120694620
neurone.hpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Jul 6, 09:22
Size
1 KB
Mime Type
text/x-c
Expires
Tue, Jul 8, 09:22 (2 d)
Engine
blob
Format
Raw Data
Handle
27231726
Attached To
R5159 CS116-2017-Romain-GROS
neurone.hpp
View Options
#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
Log In to Comment