iSpike
2.1
Spike conversion library for robotics
|
00001 #ifndef IZHIKEVICHNEURONSIM_HPP_ 00002 #define IZHIKEVICHNEURONSIM_HPP_ 00003 00004 #include <vector> 00005 00006 namespace ispike { 00007 00009 class IzhikevichNeuronSim { 00010 00011 public: 00012 IzhikevichNeuronSim(); 00013 IzhikevichNeuronSim(size_t numNeurons, double a, double b, double c, double d); 00014 const std::vector<unsigned>& getSpikes() { return spikeVector; } 00015 void step(); 00016 void setInputCurrent(unsigned index, double current); 00017 void setParameterA(double a){ this->aParam = a; } 00018 void setParameterB(double b){ this->bParam = b; } 00019 void setParameterC(double c){ this->cParam = c; } 00020 void setParameterD(double d){ this->dParam = d; } 00021 void initialize(size_t numNeurons); 00022 00023 private: 00024 00026 std::vector<unsigned> spikeVector; 00027 00029 size_t numNeurons; 00030 00031 //Izhikevich parameters 00032 double aParam; 00033 double bParam; 00034 double cParam; 00035 double dParam; 00036 00037 //Data structures for simulation 00038 std::vector<double> vArray; 00039 std::vector<double> uArray; 00040 std::vector<double> iArray; 00041 std::vector<bool> firedArray; 00042 00044 bool initialized; 00045 }; 00046 00047 } 00048 00049 00050 #endif /* IZHIKEVICHNEURONSIM_HPP_ */