nemo::Network Class Reference

Inherits nemo::ReadableNetwork.

Public Member Functions

unsigned addNeuronType (const std::string &name)
 Register a new neuron type with the network.
void addNeuron (unsigned type, unsigned idx, unsigned nargs, const float args[])
 Add a neuron to the network.
void addNeuron (unsigned idx, float a, float b, float c, float d, float u, float v, float sigma)
 Add a single Izhikevich neuron to the network.
void setNeuron (unsigned idx, unsigned nargs, const float args[])
void setNeuron (unsigned idx, float a, float b, float c, float d, float u, float v, float sigma)
float getNeuronParameter (unsigned neuron, unsigned parameter) const
float getNeuronState (unsigned neuron, unsigned var) const
void setNeuronParameter (unsigned neuron, unsigned parameter, float value)
void setNeuronState (unsigned neuron, unsigned var, float value)
unsigned getSynapseTarget (const synapse_id &) const
unsigned getSynapseDelay (const synapse_id &) const
float getSynapseWeight (const synapse_id &) const
unsigned char getSynapsePlastic (const synapse_id &) const
const std::vector< synapse_id > & getSynapsesFrom (unsigned neuron)
unsigned maxDelay () const
unsigned neuronCount () const

Detailed Description

Networks are constructed by adding individual neurons, and single or groups of synapses to the network. Neurons are given indices (from 0) which should be unique for each neuron. When adding synapses the source or target neurons need not necessarily exist yet, but should be defined before the network is finalised.


Member Function Documentation

unsigned nemo::Network::addNeuronType ( const std::string &  name  ) 

Register a new neuron type with the network.

Parameters:
name canonical name of the neuron type. The neuron type data is loaded from a plugin configuration file of the same name.
Returns:
index of the the neuron type, to be used when adding neurons.

This function must be called before neurons of the specified type can be added to the network.

void nemo::Network::addNeuron ( unsigned  type,
unsigned  idx,
unsigned  nargs,
const float  args[] 
)

Add a neuron to the network.

Parameters:
type index of the neuron type, as returned by addNeuronType
idx index of the neuron
nargs length of args
args parameters and state variables of the neuron (in that order)
Precondition:
The parameter and state arrays must have the dimensions matching the neuron type represented by type.
void nemo::Network::addNeuron ( unsigned  idx,
float  a,
float  b,
float  c,
float  d,
float  u,
float  v,
float  sigma 
)

Add a single Izhikevich neuron to the network.

The neuron uses the Izhikevich neuron model. See E. M. Izhikevich "Simple model of spiking neurons", IEEE Trans. Neural Networks, vol 14, pp 1569-1572, 2003 for a full description of the model and the parameters.

Parameters:
idx Neuron index. This should be unique
a Time scale of the recovery variable u
b Sensitivity to sub-threshold fluctutations in the membrane potential v
c After-spike reset value of the membrane potential v
d After-spike reset of the recovery variable u
u Initial value for the membrane recovery variable
v Initial value for the membrane potential
sigma Parameter for a random gaussian per-neuron process which generates random input current drawn from an N(0,sigma) distribution. If set to zero no random input current will be generated.
Deprecated:
in favour of the generic Network::addNeuron function
void nemo::Network::setNeuron ( unsigned  idx,
unsigned  nargs,
const float  args[] 
)

Set an existing neuron

Parameters:
idx index of the neuron, as used when calling addNeuron
nargs length of args
args parameters and state variables of the neuron (in that order)
Precondition:
The parameter and state arrays must have the dimensions matching the neuron type specified when the neuron was first added.
void nemo::Network::setNeuron ( unsigned  idx,
float  a,
float  b,
float  c,
float  d,
float  u,
float  v,
float  sigma 
)

Change parameters/state variables of a single existing Izhikevich-type neuron

The parameters are the same as for nemo::Network::addNeuron

Deprecated:
in favour of the generic nemo::Network::setNeuron function
float nemo::Network::getNeuronParameter ( unsigned  neuron,
unsigned  parameter 
) const

Get a single parameter for a single neuron

Parameters:
neuron neuron index
parameter parameter index
Returns:
parameter with index parameter.

For the Izhikevich model the parameter indices are 0=a, 1=b, 2=c, 3=d, 4=sigma.

float nemo::Network::getNeuronState ( unsigned  neuron,
unsigned  var 
) const

Get a single state variable for a single neuron

Parameters:
neuron neuron index
var variable index
Returns:
state variable with index var.

For the Izhikevich model the variable indices are 0=u, 1=v.

void nemo::Network::setNeuronParameter ( unsigned  neuron,
unsigned  parameter,
float  value 
)

Change a single parameter for an existing neuron

Parameters:
neuron neuron index
parameter parameter index
value new value of the state variable

For the Izhikevich model the parameter indices are 0=a, 1=b, 2=c, 3=d, 4=sigma.

void nemo::Network::setNeuronState ( unsigned  neuron,
unsigned  var,
float  value 
)

Change a single state variable for an existing neuron

Parameters:
neuron neuron index
var state variable index
value new value of the state variable

For the Izhikevich model variable indices 0=u, 1=v.

unsigned nemo::Network::getSynapseTarget ( const synapse_id &   )  const [virtual]
Returns:
target neuron id for a synapse

Implements nemo::ReadableNetwork.

unsigned nemo::Network::getSynapseDelay ( const synapse_id &   )  const [virtual]
Returns:
conductance delay for a synapse

Implements nemo::ReadableNetwork.

float nemo::Network::getSynapseWeight ( const synapse_id &   )  const [virtual]
Returns:
weight for a synapse

Implements nemo::ReadableNetwork.

unsigned char nemo::Network::getSynapsePlastic ( const synapse_id &   )  const [virtual]
Returns:
plasticity status for a synapse

Implements nemo::ReadableNetwork.

const std::vector<synapse_id>& nemo::Network::getSynapsesFrom ( unsigned  neuron  )  [virtual]

Returns:
vector of synapse ids for all synapses with the given source neuron

The vector reference is valid until the next call to this function.

Implements nemo::ReadableNetwork.

unsigned nemo::Network::maxDelay (  )  const

Returns:
maximum delay (in milliseconds) in the network

unsigned nemo::Network::neuronCount (  )  const

Returns:
maximum delay (in milliseconds) in the network

Generated on Mon Aug 15 11:38:40 2011 for NeMo by  doxygen 1.6.3