summaryrefslogtreecommitdiff
path: root/code/core/neuron.h
diff options
context:
space:
mode:
Diffstat (limited to 'code/core/neuron.h')
-rw-r--r--code/core/neuron.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/code/core/neuron.h b/code/core/neuron.h
new file mode 100644
index 0000000..03c0dbb
--- /dev/null
+++ b/code/core/neuron.h
@@ -0,0 +1,64 @@
+/*************************************************************
+neuron.h
+ implementation the axon hillock
+
+ STORES
+ * current tuning of neuron body (parameters)
+ * list of synapses (-> connections to other neurons)
+**************************************************************/
+
+#ifndef NEURON_H
+#define NEURON_H
+
+#include <boost/intrusive/slist.hpp>
+
+#include "synapse.h"
+
+using namespace boost::intrusive;
+
+typedef slist<Synapse, member_hook<Synapse, slist_member_hook<>, &Synapse::hook_dst> > SynapseDstList;
+typedef slist<Synapse, member_hook<Synapse, slist_member_hook<>, &Synapse::hook_src> > SynapseSrcList;
+
+class Neuron {
+public:
+ Neuron();
+ void init();
+
+ // functions operating on neuronal state
+ double evolve(double time);
+ double processCurrent(double time, double current);
+ double generateSpike(double time, bool &doesOccur);
+ double predictSpike(double time);
+ void intrinsicPlasticity(double td);
+
+ // reflection
+ template<class Action> bool reflect(Action &a);
+ typedef int id_type;
+ static id_type numElements();
+ static Neuron * singleton(int num); // return neuron # num
+
+ // list of outgoing and incoming synapses
+ SynapseSrcList sin;
+ SynapseDstList sout;
+ //Synapse **sin, *sout;// list of _in_coming and _out_going _s_ynapses; HINT: sin is a list of pointers to synapses in the corresponding outgoing neuron
+
+ // basic neuron properties
+ double voltage; // [V]
+ double refractoryTime; // [s]
+
+ // IP related
+ bool ip; // if this neuron has IP at all
+ double ip_est_mom1, ip_est_mom2; // estimated moments (using exponential sliding average (exact integration))
+ double ip_dst_mom1, ip_dst_mom2; // targeted moments
+ double ip_R, ip_C; // internal correspondences to christinas model
+ double fac_voltage_tau, fac_current; // resulting coefficients for neuron behaviour
+
+ // local clocks
+ double lastEvent; // timepoint when the last event occured
+ double lastSpike;
+};
+
+const int numNeurons = 1000;
+Neuron n[numNeurons];
+
+#endif // NEURON_H
contact: Jan Huwald // Impressum