GeNN  3.3.0
GPU enhanced Neuronal Networks (GeNN)
neuronModels.h
Go to the documentation of this file.
1 
2 #ifndef NEURONMODELS_H
3 #define NEURONMODELS_H
4 
5 #include "dpclass.h"
6 
7 #include <string>
8 #include <vector>
9 
10 using namespace std;
11 
12 
17 {
18 public:
19  string simCode;
22  string resetCode;
23  string supportCode;
24  vector<string> varNames;
25  vector<string> tmpVarNames;
26  vector<string> varTypes;
27  vector<string> tmpVarTypes;
28  vector<string> pNames;
29  vector<string> dpNames;
34 
35  neuronModel();
36  ~neuronModel();
37 };
38 
39 
40 // Neuron Types
41 extern vector<neuronModel> nModels;
42 extern unsigned int MAPNEURON;
43 extern unsigned int POISSONNEURON;
44 extern unsigned int TRAUBMILES_FAST;
45 extern unsigned int TRAUBMILES_ALTERNATIVE;
46 extern unsigned int TRAUBMILES_SAFE;
47 extern unsigned int TRAUBMILES;
48 extern unsigned int TRAUBMILES_PSTEP;
49 extern unsigned int IZHIKEVICH;
50 extern unsigned int IZHIKEVICH_V;
51 extern unsigned int SPIKESOURCE;
52 const unsigned int MAXNRN = 7; // maximum number of neuron types: SpineML needs to know this
53 
54 
55 //--------------------------------------------------------------------------
57 //--------------------------------------------------------------------------
58 
59 class rulkovdp : public dpclass
60 {
61 public:
62  double calculateDerivedParameter(int index, vector<double> pars, double = 1.0) {
63  switch (index) {
64  case 0:
65  return ip0(pars);
66  case 1:
67  return ip1(pars);
68  case 2:
69  return ip2(pars);
70  }
71  return -1;
72  }
73 
74 private:
75  double ip0(const vector<double> &pars) {
76  return pars[0]*pars[0]*pars[1];
77  }
78 
79  double ip1(const vector<double> &pars) {
80  return pars[0]*pars[2];
81  }
82 
83  double ip2(const vector<double> &pars) {
84  return pars[0]*pars[1]+pars[0]*pars[2];
85  }
86 };
87 
88 
89 //--------------------------------------------------------------------------
96 
97 #endif // NEURONMODELS_H
vector< string > extraGlobalNeuronKernelParameterTypes
Additional parameters in the neuron kernel; they are translated to a population specific name but oth...
Definition: neuronModels.h:32
vector< string > varTypes
Types of the variable named above, e.g. "float". Names and types are matched by their order of occurr...
Definition: neuronModels.h:26
string supportCode
Support code is made available within the neuron kernel definition file and is meant to contain user ...
Definition: neuronModels.h:23
const unsigned int MAXNRN
Definition: neuronModels.h:52
void prepareStandardModels()
Function that defines standard neuron models.
Definition: neuronModels.cc:47
unsigned int IZHIKEVICH
variable attaching the name "IZHIKEVICH"
Definition: neuronModels.cc:36
class for specifying a neuron model.
Definition: neuronModels.h:16
string resetCode
Code that defines the reset action taken after a spike occurred. This can be empty.
Definition: neuronModels.h:22
unsigned int TRAUBMILES_SAFE
variable attaching the name "TRAUBMILES_SAFE"
Definition: neuronModels.cc:33
string simCode
Code that defines the execution of one timestep of integration of the neuron model The code will refe...
Definition: neuronModels.h:19
unsigned int TRAUBMILES_ALTERNATIVE
variable attaching the name "TRAUBMILES_ALTERNATIVE"
Definition: neuronModels.cc:32
unsigned int TRAUBMILES_FAST
variable attaching the name "TRAUBMILES_FAST"
Definition: neuronModels.cc:31
string thresholdConditionCode
Code evaluating to a bool (e.g. "V > 20") that defines the condition for a true spike in the describe...
Definition: neuronModels.h:21
unsigned int TRAUBMILES
variable attaching the name "TRAUBMILES"
Definition: neuronModels.cc:34
dpclass * dps
Derived parameters.
Definition: neuronModels.h:33
vector< string > tmpVarNames
never used
Definition: neuronModels.h:25
Definition: dpclass.h:10
unsigned int SPIKESOURCE
variable attaching the name "SPIKESOURCE"
Definition: neuronModels.cc:38
vector< string > varNames
Names of the variables in the neuron model.
Definition: neuronModels.h:24
unsigned int MAPNEURON
variable attaching the name "MAPNEURON"
Definition: neuronModels.cc:29
unsigned int IZHIKEVICH_V
variable attaching the name "IZHIKEVICH_V"
Definition: neuronModels.cc:37
vector< string > pNames
Names of (independent) parameters of the model.
Definition: neuronModels.h:28
vector< neuronModel > nModels
Global C++ vector containing all neuron model descriptions.
Definition: neuronModels.cc:28
vector< string > tmpVarTypes
never used
Definition: neuronModels.h:27
unsigned int POISSONNEURON
variable attaching the name "POISSONNEURON"
Definition: neuronModels.cc:30
vector< string > extraGlobalNeuronKernelParameters
Additional parameter in the neuron kernel; it is translated to a population specific name but otherwi...
Definition: neuronModels.h:31
unsigned int TRAUBMILES_PSTEP
variable attaching the name "TRAUBMILES_PSTEP"
Definition: neuronModels.cc:35
double calculateDerivedParameter(int index, vector< double > pars, double=1.0)
Definition: neuronModels.h:62
Class defining the dependent parameters of the Rulkov map neuron.
Definition: neuronModels.h:59
vector< string > dpNames
Names of dependent parameters of the model. The dependent parameters are functions of independent par...
Definition: neuronModels.h:29