To do so it is good practice to first create a pointer to the state vector you want to use in your plastic connection class, because the lookup of a state vector via its key string (ie. get_state_vector("xyz")) takes time and the update function needs this value O(N^2) times.
Let's consider an example. Say you want to implement the ABS rule and you need to access to the membrane potential (the procedure works for any other state vector though). First, add a member variable to your "PlasticConnection" class:
Code: Select all
AurynStateVector * post_mem;
Code: Select all
post_mem = dst->get_state_vector("mem");
Code: Select all
// compute ABS-like update upon "pre" spike on neuron "post"
NeuronID local_id = dst->global2rank(post); // translate position in vector to current rank
float pm = post_mem->get(local_id);
float dw = 1e-3*(pm-vrest)*(pm-vthr);
I hope that makes sense.
Cheers,
F