SpikeStream Library
0.2
|
#include <Network.h>
Signals | |
void | taskFinished () |
Public Member Functions | |
Network (const QString &name, const QString &description, const DBInfo &networkDBInfo, const DBInfo &archiveDBInfo) | |
Network (const NetworkInfo &networkInfo, const DBInfo &networkDBInfo, const DBInfo &archiveDBInfo) | |
~Network () | |
void | addConnectionGroups (QList< ConnectionGroup * > &connectionGroupList) |
void | addNeuronGroups (QList< NeuronGroup * > &neuronGroupList) |
void | cancel () |
void | clearError () |
bool | containsNeuron (unsigned int neurID) |
bool | containsNeuronGroup (unsigned int neuronGroupID) |
void | copyTempWeightsToWeights (unsigned conGrpID) |
void | deleteConnectionGroups (QList< unsigned int > &deleteConGrpIDList) |
void | deleteNeuronGroups (QList< unsigned int > &deleteNeurGrpIDList) |
Box | getBoundingBox () |
unsigned int | getID () |
QString | getErrorMessage () |
int | getConnectionCount (unsigned conGrpID) |
int | getConnectionGroupCount () |
QList< ConnectionGroup * > | getConnectionGroups () |
ConnectionGroup * | getConnectionGroup (unsigned int id) |
ConnectionGroupInfo | getConnectionGroupInfo (unsigned int id) |
QList< ConnectionGroupInfo > | getConnectionGroupsInfo (unsigned int synapseTypeID) |
QList< ConnectionGroupInfo > | getConnectionGroupsInfo () |
int | getNeuronGroupCount () |
Box | getNeuronGroupBoundingBox (unsigned int neurGrpID) |
NeuronGroup * | getNeuronGroupFromNeuronID (unsigned neuronID) |
QList< unsigned int > | getNeuronGroupIDs () |
QString | getProgressMessage () |
QList< unsigned int > | getConnectionGroupIDs () |
NeuronGroup * | getNeuronGroup (unsigned int id) |
QList< NeuronGroup * > | getNeuronGroups () |
NeuronGroupInfo | getNeuronGroupInfo (unsigned int id) |
QList< NeuronGroupInfo > | getNeuronGroupsInfo () |
QList< NeuronGroupInfo > | getNeuronGroupsInfo (unsigned int neuronTypeID) |
int | getNumberOfCompletedSteps () |
int | getTotalNumberOfSteps () |
bool | isBusy () |
bool | isError () |
bool | isPrototypeMode () |
bool | isSaved () |
bool | isTransient () |
bool | hasArchives () |
void | load () |
void | loadWait () |
bool | overlaps (const Box &box) |
void | save () |
void | setError (const QString &errorMsg) |
void | setConnectionGroupProperties (unsigned conGrpID, const QString &description) |
void | setNeuronGroupParameters (unsigned neurGrpID, QHash< QString, double > paramMap) |
void | setNeuronGroupProperties (unsigned neurGrpID, const QString &name, const QString &description) |
void | setPrototypeMode (bool mode) |
void | setTransient (bool transient) |
int | size () |
Class holding information about a neural network in the database. This class is linked to the database to enable lazy loading of connections and neurons.
Network::Network | ( | const QString & | name, |
const QString & | description, | ||
const DBInfo & | networkDBInfo, | ||
const DBInfo & | archiveDBInfo | ||
) |
Constructor that creates a new network and adds it to the database
Definition at line 15 of file Network.cpp.
Network::Network | ( | const NetworkInfo & | networkInfo, |
const DBInfo & | networkDBInfo, | ||
const DBInfo & | archiveDBInfo | ||
) |
Constructor when using an existing network
Definition at line 39 of file Network.cpp.
Destructor
Definition at line 63 of file Network.cpp.
void Network::addConnectionGroups | ( | QList< ConnectionGroup * > & | connectionGroupList | ) |
Adds connection groups to the network.
Definition at line 91 of file Network.cpp.
void Network::addNeuronGroups | ( | QList< NeuronGroup * > & | neuronGroupList | ) |
Adds neuron groups to the network
Definition at line 135 of file Network.cpp.
void Network::cancel | ( | ) |
Cancels connection thread-based operations that are in progress. It is the responsibility of the dao thread to clean up when task has been stopped.
Definition at line 176 of file Network.cpp.
void Network::clearError | ( | ) |
Clears the error state
Definition at line 189 of file Network.cpp.
bool Network::containsNeuron | ( | unsigned int | neurID | ) |
Returns true if a neuron with the specified ID is in the network
Definition at line 196 of file Network.cpp.
bool Network::containsNeuronGroup | ( | unsigned int | neuronGroupID | ) |
Returns true if the network contains the neuron group with the specified ID.
Definition at line 208 of file Network.cpp.
void Network::copyTempWeightsToWeights | ( | unsigned | conGrpID | ) |
Copies temporary weights to the weights field and sets network saved state to false
Definition at line 216 of file Network.cpp.
void Network::deleteConnectionGroups | ( | QList< unsigned int > & | deleteConGrpIDList | ) |
Removes the specified connection groups from the network and database. Throws an exception if the connection groups cannot be found
Definition at line 235 of file Network.cpp.
void Network::deleteNeuronGroups | ( | QList< unsigned int > & | deleteNeurGrpIDList | ) |
Removes the specified neuron groups from the network and database. Throws an exception if the neuron groups cannot be found
Definition at line 269 of file Network.cpp.
Returns a box that encloses the network
Definition at line 402 of file Network.cpp.
int Network::getConnectionCount | ( | unsigned | conGrpID | ) |
Returns the number of connections in the group with the specified ID. Throws an exception if a connection group with the specified ID is not present in the network.
Definition at line 303 of file Network.cpp.
ConnectionGroup * Network::getConnectionGroup | ( | unsigned int | id | ) |
Returns the connection group with the specified id. An exception is thrown if the connection group id is not in the network.
Definition at line 469 of file Network.cpp.
int spikestream::Network::getConnectionGroupCount | ( | ) | [inline] |
QList< unsigned int > Network::getConnectionGroupIDs | ( | ) |
Returns a list of the connection group ids in the network
Definition at line 396 of file Network.cpp.
ConnectionGroupInfo Network::getConnectionGroupInfo | ( | unsigned int | id | ) |
Returns information about the connection group with the specified id
Definition at line 476 of file Network.cpp.
QList< ConnectionGroup * > Network::getConnectionGroups | ( | ) |
Returns a complete list of connection groups
Definition at line 311 of file Network.cpp.
QList< ConnectionGroupInfo > Network::getConnectionGroupsInfo | ( | unsigned int | synapseTypeID | ) |
Returns a list of connection group infos filtered by the specified synapse type ID
Definition at line 329 of file Network.cpp.
QList< ConnectionGroupInfo > Network::getConnectionGroupsInfo | ( | ) |
Returns a complete list of connection group infos
Definition at line 320 of file Network.cpp.
QString Network::getErrorMessage | ( | ) |
Returns the message associated with an error
Definition at line 483 of file Network.cpp.
unsigned int spikestream::Network::getID | ( | ) | [inline] |
NeuronGroup * Network::getNeuronGroup | ( | unsigned int | id | ) |
Returns the neuron group with the specified id. An exception is thrown if the neuron group id is not in the network. Lazy loading used, so that neuron groups are loaded only if requested.
Definition at line 454 of file Network.cpp.
Box Network::getNeuronGroupBoundingBox | ( | unsigned int | neurGrpID | ) |
Returns a box that encloses the specified neuron group
Definition at line 446 of file Network.cpp.
int spikestream::Network::getNeuronGroupCount | ( | ) | [inline] |
NeuronGroup * Network::getNeuronGroupFromNeuronID | ( | unsigned | neuronID | ) |
Returns the neuron group containing the specified neuron ID. Throws an exception if this cannot be found.
Definition at line 341 of file Network.cpp.
QList< unsigned int > Network::getNeuronGroupIDs | ( | ) |
Returns a list of the neuron group ids in the network
Definition at line 390 of file Network.cpp.
NeuronGroupInfo Network::getNeuronGroupInfo | ( | unsigned int | id | ) |
Returns information about the neuron group with the specified id
Definition at line 461 of file Network.cpp.
QList< NeuronGroup * > Network::getNeuronGroups | ( | ) |
Returns a list of the neuron groups in the network.
Definition at line 353 of file Network.cpp.
QList< NeuronGroupInfo > Network::getNeuronGroupsInfo | ( | ) |
Returns a complete list of neuron group infos
Definition at line 362 of file Network.cpp.
QList< NeuronGroupInfo > Network::getNeuronGroupsInfo | ( | unsigned int | neuronTypeID | ) |
Returns a list of neuron group infos filtered by the specified neuron type ID
Definition at line 371 of file Network.cpp.
Returns the number of steps that have been completed so far during a heavy operation.
Definition at line 489 of file Network.cpp.
QString Network::getProgressMessage | ( | ) |
Returns progress message
Definition at line 511 of file Network.cpp.
int Network::getTotalNumberOfSteps | ( | ) |
Returns the number of steps involved in the current tasks
Definition at line 500 of file Network.cpp.
bool Network::hasArchives | ( | ) |
Returns true if the network is not editable because it is associated with archives
Definition at line 524 of file Network.cpp.
bool Network::isBusy | ( | ) |
Returns true if heavy thread-based operations are in progress
Definition at line 382 of file Network.cpp.
bool spikestream::Network::isError | ( | ) | [inline] |
bool spikestream::Network::isPrototypeMode | ( | ) | [inline] |
bool Network::isSaved | ( | ) |
Returns true if the network matches the database
Definition at line 531 of file Network.cpp.
bool spikestream::Network::isTransient | ( | ) | [inline] |
void Network::load | ( | ) |
Loads up the network from the database using separate threads
Definition at line 551 of file Network.cpp.
void Network::loadWait | ( | ) |
Loads up the network from the database without using separate threads. Only returns when load is complete. Mainly used for testing
Definition at line 574 of file Network.cpp.
bool Network::overlaps | ( | const Box & | box | ) |
Returns true if a neuron group in the network overlaps with the specified box.
Definition at line 435 of file Network.cpp.
void Network::save | ( | ) |
Saves the network. Throws an exception if network is not in prototyping mode.
Definition at line 599 of file Network.cpp.
void Network::setConnectionGroupProperties | ( | unsigned | conGrpID, |
const QString & | description | ||
) |
Sets the description of a connection group. Throws an exception if the connection group cannot be found.
Definition at line 645 of file Network.cpp.
void Network::setError | ( | const QString & | errorMsg | ) |
Sets the class into error state and adds error message
Definition at line 980 of file Network.cpp.
void Network::setNeuronGroupParameters | ( | unsigned | neurGrpID, |
QHash< QString, double > | paramMap | ||
) |
Sets the parameters of a particular neuron group
Definition at line 659 of file Network.cpp.
void Network::setNeuronGroupProperties | ( | unsigned | neurGrpID, |
const QString & | name, | ||
const QString & | description | ||
) |
Sets the name and description of a neuron group. Throws an exception of the neuron group cannot be found.
Definition at line 679 of file Network.cpp.
void Network::setPrototypeMode | ( | bool | mode | ) |
Puts the network into prototype mode
Definition at line 694 of file Network.cpp.
void spikestream::Network::setTransient | ( | bool | transient | ) | [inline] |
int Network::size | ( | ) |
Returns the number of neurons in the network. Throws exception if this is called when network is not loaded.
Definition at line 793 of file Network.cpp.
void spikestream::Network::taskFinished | ( | ) | [signal] |