GeNN  3.3.0
GPU enhanced Neuronal Networks (GeNN)
postSynapseModels.h
Go to the documentation of this file.
1 
2 #ifndef POSTSYNAPSEMODELS_H
3 #define POSTSYNAPSEMODELS_H
4 
5 #include "dpclass.h"
6 
7 #include <string>
8 #include <vector>
9 #include <cmath>
10 
11 using namespace std;
12 
13 
18 {
19 public:
21  string postSynDecay;
22  string supportCode;
23  vector<string> varNames;
24  vector<string> varTypes;
25  vector<string> pNames;
26  vector<string> dpNames;
28 
29  postSynModel();
30  ~postSynModel();
31 };
32 
33 
34 // Post-Synapse Types
35 extern vector<postSynModel> postSynModels;
36 extern unsigned int EXPDECAY; //default - exponential decay
37 extern unsigned int IZHIKEVICH_PS; //empty postsynaptic rule for the Izhikevich model.
38 const unsigned int MAXPOSTSYN = 2; // maximum number of postsynaptic integration: SpineML needs to know this
39 
40 
41 //--------------------------------------------------------------------------
43 //--------------------------------------------------------------------------
44 
45 class expDecayDp : public dpclass
46 {
47 public:
48  double calculateDerivedParameter(int index, vector<double> pars, double dt = 1.0) {
49  switch (index) {
50  case 0:
51  return expDecay(pars, dt);
52  }
53  return -1;
54  }
55 
56 private:
57  double expDecay(const vector<double>& pars, double dt) {
58  return exp(-dt/pars[0]);
59  }
60 };
61 
62 
63 //--------------------------------------------------------------------------
66 //--------------------------------------------------------------------------
67 
69 
70 #endif // POSTSYNAPSEMODELS_H
string postSynDecay
Code that defines how postsynaptic current decays.
Definition: postSynapseModels.h:21
void preparePostSynModels()
Function that prepares the standard post-synaptic models, including their variables, parameters, dependent parameters and code strings.
Definition: postSynapseModels.cc:38
vector< string > varTypes
Types of the variable named above, e.g. "float". Names and types are matched by their order of occurr...
Definition: postSynapseModels.h:24
Class to hold the information that defines a post-synaptic model (a model of how synapses affect post...
Definition: postSynapseModels.h:17
const unsigned int MAXPOSTSYN
Definition: postSynapseModels.h:38
unsigned int EXPDECAY
Definition: postSynapseModels.cc:29
string supportCode
Support code is made available within the neuron kernel definition file and is meant to contain user ...
Definition: postSynapseModels.h:22
Definition: dpclass.h:10
dpclass * dps
Derived parameters.
Definition: postSynapseModels.h:27
vector< string > dpNames
Names of dependent parameters of the model.
Definition: postSynapseModels.h:26
vector< postSynModel > postSynModels
Global C++ vector containing all post-synaptic update model descriptions.
Definition: postSynapseModels.cc:28
vector< string > varNames
Names of the variables in the postsynaptic model.
Definition: postSynapseModels.h:23
string postSyntoCurrent
Code that defines how postsynaptic update is translated to current.
Definition: postSynapseModels.h:20
vector< string > pNames
Names of (independent) parameters of the model.
Definition: postSynapseModels.h:25
Class defining the dependent parameter for exponential decay.
Definition: postSynapseModels.h:45
unsigned int IZHIKEVICH_PS
Definition: postSynapseModels.cc:30
double calculateDerivedParameter(int index, vector< double > pars, double dt=1.0)
Definition: postSynapseModels.h:48