#include <ConnectionManager.h>
Public Member Functions | |
| ConnectionManager (DBInterface *netDBInter, DBInterface *devDBInter) | |
| int | createConnections (ConnectionHolder) |
| void | deleteConnections (vector< ConnectionHolder >) |
| ~ConnectionManager () | |
Private Member Functions | |
| bool | connectionExists (mysqlpp::Query &, unsigned int, unsigned int) |
| ConnectionManager (const ConnectionManager &) | |
| void | createOffCentreOnSurroundConns (ConnectionHolder &, int &) |
| void | createOnCentreOffSurroundConns (ConnectionHolder &, int &) |
| void | createSIMNOSComponentConns (ConnectionHolder &, int &) |
| void | createSimpleCortexConns (ConnectionHolder &, int &) |
| void | createTopographicConns (ConnectionHolder &, int &) |
| void | createUnstructuredConns (ConnectionHolder &, int &) |
| void | createUnstructuredExInhibConnections (ConnectionHolder &connHolder, int &connectionCount) |
| bool | evaluateConnectionProbability (double, double, double) |
| void | fillRandomSelectionVector (vector< unsigned int > &ranSelVect, unsigned int startNeuronID, unsigned int endNeuronID, double connectionDensity) |
| unsigned short | getDelay (unsigned short, unsigned short) |
| double | getDistance (int, int, int, int) |
| double | getNormalRandom () |
| short | getWeight (double, double, double) |
| bool | isExcitatoryNeuron (unsigned int neuronID, double excitatoryPercentage) |
| ConnectionManager | operator= (const ConnectionManager &) |
Private Attributes | |
| DBInterface * | deviceDBInterface |
| DBInterface * | networkDBInterface |
| QProgressDialog * | progressDialog |
| SpikeStreamApplication * | spikeStrApp |
Definition at line 47 of file ConnectionManager.h.
|
||||||||||||
|
Constructor. Definition at line 51 of file ConnectionManager.cpp. References deviceDBInterface, networkDBInterface, progressDialog, spikeStrApp, and SpikeStreamMainWindow::spikeStreamApplication. |
|
|
Destructor. Definition at line 68 of file ConnectionManager.cpp. References progressDialog. |
|
|
Declare copy constructor private so it cannot be used inadvertently. |
|
||||||||||||||||
|
Method that checks to see whether a connection between these neurons already exists in the database At present only a single from, to connection can be made between two neurons. This could be easily changed at a later point by making the primary key of the Connections table more complex so that it includes the connection group or synapse type, for example. In this first version things are being kept simple. Definition at line 242 of file ConnectionManager.cpp. Referenced by createOnCentreOffSurroundConns(), createSimpleCortexConns(), createTopographicConns(), createUnstructuredConns(), and createUnstructuredExInhibConnections(). |
|
|
Creates a new connection group of the type specified in the connection holder Only one connection group of each type can exist between two neuron groups. Only one from-to and one to-from connection can exist between two neurons. Definition at line 84 of file ConnectionManager.cpp. References ConnectionHolder::connectionGrpID, ConnectionHolder::connectionType, createOffCentreOnSurroundConns(), createOnCentreOffSurroundConns(), createSIMNOSComponentConns(), createSimpleCortexConns(), createTopographicConns(), createUnstructuredConns(), createUnstructuredExInhibConnections(), ConnectionHolder::fromLayerID, ConnectionHolder::maxDelay, ConnectionHolder::minDelay, networkDBInterface, ConnectionHolder::paramMap, ConnectionHolder::synapseType, and ConnectionHolder::toLayerID. Referenced by ConnectionWidget::createConnections(). |
|
||||||||||||
|
OFF CENTRE ON SURROUND CONNECTIONS FIXME NOT IMPLEMENTED AT PRESENT. Definition at line 254 of file ConnectionManager.cpp. Referenced by createConnections(). |
|
||||||||||||
|
ON CENTRE OFF SURROUND CONNECTIONS Method that creates on centre off surround connections. These are rectangular in shape at present. In the future it would be nice to add a circular option Basic strategy for this function is to work through each of the to neurons, select the neurons in the from layer that are within the connection area, work through this selection and then create the connection. Definition at line 264 of file ConnectionManager.cpp. References connectionExists(), ConnectionHolder::connectionGrpID, createConnectionException, ConnectionHolder::fromLayerID, getDelay(), getWeight(), ConnectionHolder::maxDelay, ConnectionHolder::minDelay, networkDBInterface, ConnectionHolder::paramMap, progressDialog, and ConnectionHolder::toLayerID. Referenced by createConnections(). |
|
||||||||||||
|
Creates topographic connections between this layer and part of the device layer Each component contains a list of receptor ids and so have to work through these and make the appropriate connections to the device input layer. Definition at line 447 of file ConnectionManager.cpp. References ConnectionHolder::componentID, ConnectionHolder::connectionGrpID, deviceDBInterface, ConnectionHolder::deviceIsFrom, ConnectionHolder::fromLayerID, getDelay(), getWeight(), ConnectionHolder::maxDelay, ConnectionHolder::minDelay, networkDBInterface, ConnectionHolder::paramMap, and ConnectionHolder::toLayerID. Referenced by createConnections(). |
|
||||||||||||
|
SIMPLE CORTEX CONNECTIONS Method that creates cortex style connections within a single layer. Combines short range excitation with long range inhibition. Normally distributed random selection of neurons within a circle Strategy is to select each neuron within the layer and connect appropriateliy to all neurons within the circle regardless of whether the central neuron is on the edge or not. Definition at line 564 of file ConnectionManager.cpp. References connectionExists(), ConnectionHolder::connectionGrpID, evaluateConnectionProbability(), ConnectionHolder::fromLayerID, getDelay(), getDistance(), getWeight(), ConnectionHolder::maxDelay, ConnectionHolder::minDelay, networkDBInterface, ConnectionHolder::paramMap, and progressDialog. Referenced by createConnections(). |
|
||||||||||||
|
Creates connections that are topographically mapped between the two layers NOTE Only works between layers of identical size. Definition at line 738 of file ConnectionManager.cpp. References connectionExists(), ConnectionHolder::connectionGrpID, ConnectionHolder::fromLayerID, getDelay(), getWeight(), ConnectionHolder::maxDelay, ConnectionHolder::minDelay, networkDBInterface, ConnectionHolder::paramMap, progressDialog, spikeStrApp, and ConnectionHolder::toLayerID. Referenced by createConnections(). |
|
||||||||||||
|
Creates an unstructured set of connections selected at random between two layers. Works through each of the neurons in the from layer and selects a random subset of neurons to connect to in the to layer. Definition at line 959 of file ConnectionManager.cpp. References connectionExists(), ConnectionHolder::connectionGrpID, fillRandomSelectionVector(), ConnectionHolder::fromLayerID, getDelay(), getWeight(), ConnectionHolder::maxDelay, ConnectionHolder::minDelay, networkDBInterface, ConnectionHolder::paramMap, progressDialog, spikeStrApp, and ConnectionHolder::toLayerID. Referenced by createConnections(). |
|
||||||||||||
|
Creates unstructured connections in which each neuron either makes excitatory connections or inhibitory connections. Similar to the basic unstructured method. Definition at line 1047 of file ConnectionManager.cpp. References connectionExists(), ConnectionHolder::connectionGrpID, fillRandomSelectionVector(), ConnectionHolder::fromLayerID, getDelay(), getWeight(), isExcitatoryNeuron(), ConnectionHolder::maxDelay, ConnectionHolder::minDelay, networkDBInterface, ConnectionHolder::paramMap, progressDialog, spikeStrApp, and ConnectionHolder::toLayerID. Referenced by createConnections(). |
|
|
Deletes connections from the ConnectionGroups table and the Connections table. Definition at line 195 of file ConnectionManager.cpp. References networkDBInterface. Referenced by ConnectionWidget::deleteConnections(). |
|
||||||||||||||||
|
For cortex connections want to create a normally distributed connection pattern where neurons that are closest to the connecting neuron are most likely to get connected and neurons closest to the radius are least likely to be connected. This method evaluates whether the connection should be created depending on its distance from the neuron. Also has a control (connectionDensity) which varies this probability. Should create a normal distribution of connections surrounding neuron. Definition at line 1157 of file ConnectionManager.cpp. References getNormalRandom(). Referenced by createSimpleCortexConns(). |
|
||||||||||||||||||||
|
Creates a list of to neurons to connect to. A random number is generated and if this is greater than the connection density * ran max, then the neuronID is added to the vector Definition at line 1194 of file ConnectionManager.cpp. Referenced by createUnstructuredConns(), and createUnstructuredExInhibConnections(). |
|
||||||||||||
|
Generates the delay for a connection. Returns a positive random number between minDelay and maxDelay. Definition at line 1205 of file ConnectionManager.cpp. References createConnectionException. Referenced by createOnCentreOffSurroundConns(), createSIMNOSComponentConns(), createSimpleCortexConns(), createTopographicConns(), createUnstructuredConns(), and createUnstructuredExInhibConnections(). |
|
||||||||||||||||||||
|
Returns the distance between point 1 and point 2 using Pythagoras. Definition at line 1233 of file ConnectionManager.cpp. Referenced by createSimpleCortexConns(). |
|
|
Returns a normally distributed random number with standar deviation = 1 Uses Box-Muller method to generate values Code adapted from http://www.csit.fsu.edu/~burkardt/cpp_src/random_data/random_data.html. Definition at line 1242 of file ConnectionManager.cpp. Referenced by evaluateConnectionProbability(), and getWeight(). |
|
||||||||||||||||
|
Applies noise to the given weight, returning a number between -128 and 127 First get the random or normally distributed noise within the noise range Then convert to a number between -128 and 127. Definition at line 1271 of file ConnectionManager.cpp. References getNormalRandom(). Referenced by createOnCentreOffSurroundConns(), createSIMNOSComponentConns(), createSimpleCortexConns(), createTopographicConns(), createUnstructuredConns(), and createUnstructuredExInhibConnections(). |
|
||||||||||||
|
Returns true if the neuron is an excitatory neuron, either because it already has just excitatory connections or a random number is used to select its type. Definition at line 1320 of file ConnectionManager.cpp. References createConnectionException, and networkDBInterface. Referenced by createUnstructuredExInhibConnections(). |
|
|
Declare assignment private so it cannot be used inadvertently. |
|
|
Reference to device database handling class. Definition at line 62 of file ConnectionManager.h. Referenced by ConnectionManager(), and createSIMNOSComponentConns(). |
|
|
Reference to network database handling class. Definition at line 59 of file ConnectionManager.h. Referenced by ConnectionManager(), createConnections(), createOnCentreOffSurroundConns(), createSIMNOSComponentConns(), createSimpleCortexConns(), createTopographicConns(), createUnstructuredConns(), createUnstructuredExInhibConnections(), deleteConnections(), and isExcitatoryNeuron(). |
|
|
Progress dialog to give feedback about progress of connection creation. Definition at line 65 of file ConnectionManager.h. Referenced by ConnectionManager(), createOnCentreOffSurroundConns(), createSimpleCortexConns(), createTopographicConns(), createUnstructuredConns(), createUnstructuredExInhibConnections(), and ~ConnectionManager(). |
|
|
Short version of the reference to QApplication to update it during large connection creations. Definition at line 69 of file ConnectionManager.h. Referenced by ConnectionManager(), createTopographicConns(), createUnstructuredConns(), and createUnstructuredExInhibConnections(). |
1.4.4