Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

ConnectionMatrixLoader Class Reference

#include <ConnectionMatrixLoader.h>

List of all members.

Public Member Functions

 ConnectionMatrixLoader (DBInterface *netDBInter)
bool loadConnectionMatrix (QString &fileName)
 ~ConnectionMatrixLoader ()

Private Member Functions

void addConnections (QStringList &neuronIDList)
void createConnectionGroup (const QString &fileName)
void createNeuronGroup ()
void deleteDatabaseEntries (unsigned int nGrpID, unsigned int cGrpID)
void showError (const QString &errMsg)
void showError (const char *errMsg)

Private Attributes

unsigned int connectionCount
unsigned int connGrpID
bool errorState
DBInterface * networkDBInterface
unsigned int neurGrpID
unsigned int neurGrpLength
unsigned int neurGrpWidth
unsigned int neuronType
QString neurParamTable
unsigned int numNeur
unsigned int rowNum
unsigned int startNeurID
unsigned int synapseType


Detailed Description

Loads a connection matrix from a file and creates a neuron group and connection group. The matrix must be square or an error will be thrown. The neuron group is created with the first type of neuron and synapse in the database and starting at position 0, 0, 0. Will try and make the neuron group as close to square as possible. FIXME NEED A DIALOG TO SPECIFY THE DETAILS PROPERLY. FIXME THIS METHOD HAS NOT BEEN PROPERLY TESTED.

Definition at line 42 of file ConnectionMatrixLoader.h.


Constructor & Destructor Documentation

ConnectionMatrixLoader::ConnectionMatrixLoader DBInterface *  netDBInter  ) 
 

Constructor.

Definition at line 46 of file ConnectionMatrixLoader.cpp.

References networkDBInterface.

ConnectionMatrixLoader::~ConnectionMatrixLoader  ) 
 

Destructor.

Definition at line 53 of file ConnectionMatrixLoader.cpp.


Member Function Documentation

void ConnectionMatrixLoader::addConnections QStringList &  neuronIDList  )  [private]
 

Adds the connections to the database.

Definition at line 215 of file ConnectionMatrixLoader.cpp.

References connectionCount, connGrpID, networkDBInterface, rowNum, showError(), and startNeurID.

Referenced by loadConnectionMatrix().

void ConnectionMatrixLoader::createConnectionGroup const QString &  fileName  )  [private]
 

Creates a connection group internal to the specified neuron group. Returns the connection group id.

Definition at line 258 of file ConnectionMatrixLoader.cpp.

References connGrpID, networkDBInterface, neurGrpID, showError(), and synapseType.

Referenced by loadConnectionMatrix().

void ConnectionMatrixLoader::createNeuronGroup  )  [private]
 

Creates a neuron group and its associated neurons. Returns the neuron id.

Definition at line 319 of file ConnectionMatrixLoader.cpp.

References deleteDatabaseEntries(), networkDBInterface, neurGrpID, neurGrpLength, neurGrpWidth, neuronType, neurParamTable, numNeur, showError(), and startNeurID.

Referenced by loadConnectionMatrix().

void ConnectionMatrixLoader::deleteDatabaseEntries unsigned int  nGrpID,
unsigned int  cGrpID
[private]
 

Cleans up the database when an error occurs.

Definition at line 434 of file ConnectionMatrixLoader.cpp.

References connGrpID, networkDBInterface, neurGrpID, neurParamTable, and showError().

Referenced by createNeuronGroup(), and loadConnectionMatrix().

bool ConnectionMatrixLoader::loadConnectionMatrix QString &  fileName  ) 
 

Loads a connection matrix from the file into the database.

Definition at line 65 of file ConnectionMatrixLoader.cpp.

References addConnections(), connectionCount, connGrpID, createConnectionGroup(), createNeuronGroup(), deleteDatabaseEntries(), errorState, networkDBInterface, neurGrpID, neurGrpLength, neurGrpWidth, neuronType, neurParamTable, numNeur, rowNum, showError(), and synapseType.

Referenced by SpikeStreamMainWindow::importConnectionMatrix().

void ConnectionMatrixLoader::showError const QString &  errMsg  )  [private]
 

Writes error message to std out and shows message box with error. NOTE Not thread safe.

Definition at line 514 of file ConnectionMatrixLoader.cpp.

References errorState.

void ConnectionMatrixLoader::showError const char *  errMsg  )  [private]
 

Writes error message to std out and shows message box with error. NOTE Not thread safe.

Definition at line 505 of file ConnectionMatrixLoader.cpp.

References errorState.

Referenced by addConnections(), createConnectionGroup(), createNeuronGroup(), deleteDatabaseEntries(), and loadConnectionMatrix().


Member Data Documentation

unsigned int ConnectionMatrixLoader::connectionCount [private]
 

Count of the number of connections that have been added.

Definition at line 79 of file ConnectionMatrixLoader.h.

Referenced by addConnections(), and loadConnectionMatrix().

unsigned int ConnectionMatrixLoader::connGrpID [private]
 

Id of the connection group is set here when it has been created. Also used to track whether the connection group has been created.

Definition at line 59 of file ConnectionMatrixLoader.h.

Referenced by addConnections(), createConnectionGroup(), deleteDatabaseEntries(), and loadConnectionMatrix().

bool ConnectionMatrixLoader::errorState [private]
 

Flag set to true when an error is encountered.

Definition at line 88 of file ConnectionMatrixLoader.h.

Referenced by loadConnectionMatrix(), and showError().

DBInterface* ConnectionMatrixLoader::networkDBInterface [private]
 

Definition at line 51 of file ConnectionMatrixLoader.h.

Referenced by addConnections(), ConnectionMatrixLoader(), createConnectionGroup(), createNeuronGroup(), deleteDatabaseEntries(), and loadConnectionMatrix().

unsigned int ConnectionMatrixLoader::neurGrpID [private]
 

Id of the neuron group is set here when it has been created. Also used to track whether the neuron group has been created.

Definition at line 55 of file ConnectionMatrixLoader.h.

Referenced by createConnectionGroup(), createNeuronGroup(), deleteDatabaseEntries(), and loadConnectionMatrix().

unsigned int ConnectionMatrixLoader::neurGrpLength [private]
 

Length of the neuron group.

Definition at line 73 of file ConnectionMatrixLoader.h.

Referenced by createNeuronGroup(), and loadConnectionMatrix().

unsigned int ConnectionMatrixLoader::neurGrpWidth [private]
 

Width of the neuron group.

Definition at line 70 of file ConnectionMatrixLoader.h.

Referenced by createNeuronGroup(), and loadConnectionMatrix().

unsigned int ConnectionMatrixLoader::neuronType [private]
 

The neuron type. Should be the first type in the NeuronTypes database

Definition at line 67 of file ConnectionMatrixLoader.h.

Referenced by createNeuronGroup(), and loadConnectionMatrix().

QString ConnectionMatrixLoader::neurParamTable [private]
 

The parameters table for the neurons.

Definition at line 91 of file ConnectionMatrixLoader.h.

Referenced by createNeuronGroup(), deleteDatabaseEntries(), and loadConnectionMatrix().

unsigned int ConnectionMatrixLoader::numNeur [private]
 

The size of the neuron group that is being created.

Definition at line 76 of file ConnectionMatrixLoader.h.

Referenced by createNeuronGroup(), and loadConnectionMatrix().

unsigned int ConnectionMatrixLoader::rowNum [private]
 

Count of the rows.

Definition at line 82 of file ConnectionMatrixLoader.h.

Referenced by addConnections(), and loadConnectionMatrix().

unsigned int ConnectionMatrixLoader::startNeurID [private]
 

The lowest ID in the neuron group.

Definition at line 85 of file ConnectionMatrixLoader.h.

Referenced by addConnections(), and createNeuronGroup().

unsigned int ConnectionMatrixLoader::synapseType [private]
 

The synapse type. Should be the first type in the SynapseTypes database

Definition at line 63 of file ConnectionMatrixLoader.h.

Referenced by createConnectionGroup(), and loadConnectionMatrix().


The documentation for this class was generated from the following files:
Generated on Mon Sep 3 22:29:05 2007 for SpikeStream Application by  doxygen 1.4.4