Hello everyone,
I recently started using Mathematica for modeling a type of spike timing neural networks where every neuron is connected to a number of other nodes and is evaluated at each time step. These types of models require to hold some information about each node. That is:
- the nodes that it receives input from (connections)
- the weight for each connection
- a list of the states for the last k timesteps (memory)
In addition the network structure is dynamic and nodes are frequently added and removed from the network.
In a procedural language such as C, such a network would be implemented using pointers to objects or structs.
However I have not found a good data structure for my models in Mathematica. In my recent attempts I used Associations with the the key referencing to the ID of a node and each node holding an association with all the information about the node (including an adjecency lists, list of weights, etc). Yet I find this structure to be highly inefficient as every reference from node i to node j causes a lookup of the index j in the association.
Does anyone know a good approach for implementing such a network in Mathematica?