~ubuntu-branches/ubuntu/wily/brian/wily

« back to all changes in this revision

Viewing changes to brian/synapses/datastructure.txt

  • Committer: Package Import Robot
  • Author(s): Yaroslav Halchenko
  • Date: 2014-07-30 11:29:44 UTC
  • mfrom: (6.1.2 experimental)
  • Revision ID: package-import@ubuntu.com-20140730112944-ln0ogbq0kpyyuz47
Tags: 1.4.1-2
* Forgotten upload to unstable
* debian/control
  - policy boost to 3.9.5
  - updated Vcs- fields given migration to anonscm.d.o and provided -b
    debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Data structure for the Synapses object
 
2
======================================
 
3
* 1 SpikeQueue for pre and post (can be a Brian contained object or could be called by the Synapses object)
 
4
 
 
5
Synaptic mappings:
 
6
* synapse -> variables (w) (floats)
 
7
        could be separated between continuously updated variables (i.e., not parameters) to be put in _S and other ones
 
8
        This should be a dynamic state matrix (extendable 2D array).
 
9
        For now it's in _S.
 
10
* synapse -> presynaptic i (int32 or smaller, based on the size of the presynaptic group)
 
11
        This should be a dynamic vector.
 
12
        I call it 'presynaptic' for now.
 
13
* synapse -> postsynaptic j (same)
 
14
        I call it 'postsynaptic' for now.
 
15
* synapse -> presynaptic delay (depending on max delay? but this is not known at the beginning)
 
16
        This is better than presynaptic i -> delay for construction.
 
17
* synapse -> postsynaptic delay
 
18
 
 
19
The synaptic mappings should be addressable by (pre,post) number (2D or 3D).
 
20
This could be done using separate objects, one per synaptic variable. There would be a dictionary
 
21
of these objects.
 
22
 
 
23
Pre/post mappings (useful for construction and spike queues):
 
24
* presynaptic i -> synapse indexes (int32 or more? depending on len(pre)*len(post))
 
25
        List of dynamic arrays
 
26
* postsynaptic j -> synapse indexes
 
27
 
 
28
Code:
 
29
* presynaptic/postsynaptic code and namespace (pre_code,pre_namespace)
 
30
 
 
31
Accessing synaptic variables
 
32
----------------------------
 
33
To do something like S.w[1,2]=1*nS
 
34
we need to have a special vector class that can be indexed with pre/post indexes.
 
35
First, the setattr method can be directly inherited from NeuronGroup, except
 
36
for the delays. It allows things like:
 
37
S.w=[1*nS,2*nS]
 
38
although maybe this should not be allowed.
 
39
 
 
40
The import method is getattr. It returns an object with a getitem that allows
 
41
2 and 3D access to an underlying sparse matrix.