SpikeStream Library
0.2
|
#include <NeuronGroup.h>
Public Member Functions | |
NeuronGroup (const NeuronGroupInfo &info) | |
~NeuronGroup () | |
void | addLayer (int width, int height, int xPos, int yPos, int zPos) |
Neuron * | addNeuron (float xPos, float yPos, float zPos) |
NeuronMap::iterator | begin () |
NeuronMap::iterator | end () |
NeuronPositionIterator | positionBegin () |
NeuronPositionIterator | positionEnd () |
void | buildPositionMap () |
void | clearNeurons () |
bool | contains (unsigned int neurID) |
bool | contains (unsigned int neurID, float x, float y, float z) |
Box | getBoundingBox () |
unsigned int | getID () |
NeuronGroupInfo | getInfo () |
Neuron * | getNearestNeuron (const Point3D &point) |
unsigned int | getNeuronIDAtLocation (const Point3D &location) |
QList< unsigned int > | getNeuronIDs () |
Point3D & | getNeuronLocation (unsigned int neuronID) |
NeuronMap * | getNeuronMap () |
QList< Neuron * > | getNeurons (const Box &box) |
unsigned | getNeuronTypeID () |
double | getParameter (const QString &key) |
QHash< QString, double > | getParameters () |
unsigned int | getStartNeuronID () |
bool | isWeightless () |
bool | parametersSet () |
void | print () |
void | setID (unsigned int id) |
void | setDescription (const QString &description) |
void | setName (const QString &name) |
void | setNeuronMap (NeuronMap *newMap) |
void | setParameters (QHash< QString, double > ¶mMap) |
void | setStartNeuronID (unsigned int id) |
int | size () |
Static Public Member Functions | |
static Point3D | getPointFromPositionKey (uint64_t positionKey) |
static uint64_t | getPositionKey (int xPos, int yPos, int zPos) |
A group of neurons.
Definition at line 26 of file NeuronGroup.h.
NeuronGroup::NeuronGroup | ( | const NeuronGroupInfo & | info | ) |
Constructor
Definition at line 20 of file NeuronGroup.cpp.
Destructor
Definition at line 30 of file NeuronGroup.cpp.
void NeuronGroup::addLayer | ( | int | width, |
int | height, | ||
int | xPos, | ||
int | yPos, | ||
int | zPos | ||
) |
Adds a layer to the group with the specified width and height. Temporary neuron ids are used and the neurons are appended to the neurons already in the group.
Definition at line 71 of file NeuronGroup.cpp.
Neuron * NeuronGroup::addNeuron | ( | float | xPos, |
float | yPos, | ||
float | zPos | ||
) |
Adds a neuron to the group using a temporary ID. This ID is replaced by the actual ID when the group is added to the network and database.
Definition at line 45 of file NeuronGroup.cpp.
NeuronMap::iterator spikestream::NeuronGroup::begin | ( | ) | [inline] |
Definition at line 32 of file NeuronGroup.h.
void NeuronGroup::buildPositionMap | ( | ) |
Builds map that allows iteration by geometrically close neurons.
Definition at line 82 of file NeuronGroup.cpp.
void NeuronGroup::clearNeurons | ( | ) |
Clears all of the neurons that are currently loaded
Definition at line 101 of file NeuronGroup.cpp.
bool NeuronGroup::contains | ( | unsigned int | neurID | ) |
Returns true if the neuron group contains a neuron with the specified id.
Definition at line 112 of file NeuronGroup.cpp.
bool NeuronGroup::contains | ( | unsigned int | neurID, |
float | x, | ||
float | y, | ||
float | z | ||
) |
Returns true if a neuron with this specification exists in this group
Definition at line 120 of file NeuronGroup.cpp.
NeuronMap::iterator spikestream::NeuronGroup::end | ( | ) | [inline] |
Definition at line 33 of file NeuronGroup.h.
Returns the bounding box of the neuron group. Only calculates bounding box if neuron group has changed.
Definition at line 131 of file NeuronGroup.cpp.
unsigned NeuronGroup::getID | ( | ) |
Returns the ID of the neuron group
Definition at line 172 of file NeuronGroup.cpp.
NeuronGroupInfo spikestream::NeuronGroup::getInfo | ( | ) | [inline] |
Definition at line 42 of file NeuronGroup.h.
Neuron * NeuronGroup::getNearestNeuron | ( | const Point3D & | point | ) |
Returns the nearest neuron to the specified point. When more than one neurons are found, only the first is returned. FIXME: CURRENTLY A COMPLETE SEARCH - OPTIMIZE!
Definition at line 180 of file NeuronGroup.cpp.
unsigned int NeuronGroup::getNeuronIDAtLocation | ( | const Point3D & | point | ) |
Returns the ID of the neuron at a specified location
Definition at line 204 of file NeuronGroup.cpp.
QList<unsigned int> spikestream::NeuronGroup::getNeuronIDs | ( | ) | [inline] |
Definition at line 45 of file NeuronGroup.h.
Point3D & NeuronGroup::getNeuronLocation | ( | unsigned int | neuronID | ) |
Returns the location of the neuron with the specified ID
Definition at line 215 of file NeuronGroup.cpp.
NeuronMap* spikestream::NeuronGroup::getNeuronMap | ( | ) | [inline] |
Definition at line 47 of file NeuronGroup.h.
QList< Neuron * > NeuronGroup::getNeurons | ( | const Box & | box | ) |
Returns neurons contained within the specified box
Definition at line 225 of file NeuronGroup.cpp.
unsigned NeuronGroup::getNeuronTypeID | ( | ) |
Returns the ID of the neuron group's type
Definition at line 237 of file NeuronGroup.cpp.
double NeuronGroup::getParameter | ( | const QString & | key | ) |
Returns a parameter with the specified key. Throws an exception if the parameter cannot be found
Definition at line 244 of file NeuronGroup.cpp.
QHash<QString, double> spikestream::NeuronGroup::getParameters | ( | ) | [inline] |
Definition at line 51 of file NeuronGroup.h.
Point3D NeuronGroup::getPointFromPositionKey | ( | uint64_t | positionKey | ) | [static] |
Converts a position key into a point
Definition at line 274 of file NeuronGroup.cpp.
uint64_t NeuronGroup::getPositionKey | ( | int | xPos, |
int | yPos, | ||
int | zPos | ||
) | [static] |
Returns a 64 bit key that encodes the position of the neuron in 3D. Enables topographic iteration through the neuron group. Can't use two's complement because want an ordered sequence starting
Definition at line 255 of file NeuronGroup.cpp.
unsigned int spikestream::NeuronGroup::getStartNeuronID | ( | ) | [inline] |
Definition at line 54 of file NeuronGroup.h.
bool NeuronGroup::isWeightless | ( | ) |
Returns true if this neuron group is weightless
Definition at line 286 of file NeuronGroup.cpp.
bool NeuronGroup::parametersSet | ( | ) |
Returns true if the parameters have been set.
Definition at line 294 of file NeuronGroup.cpp.
Returns an iterator to the beginning of the position map, enabling topological iteration through the group, starting with the z axis, then y, then x. Position map is built after first call to this or end method.
Definition at line 315 of file NeuronGroup.cpp.
Returns an iterator to the end of the position map, enabling topological iteration through the group, starting with the z axis, then y, then x. Position map is built after first call to this or end method.
Definition at line 325 of file NeuronGroup.cpp.
void NeuronGroup::print | ( | ) |
Prints out the neuron group for debugging.
Definition at line 302 of file NeuronGroup.cpp.
void NeuronGroup::setDescription | ( | const QString & | description | ) |
Sets the description of the neuron group
Definition at line 339 of file NeuronGroup.cpp.
void NeuronGroup::setID | ( | unsigned int | id | ) |
Sets the ID of the neuron group
Definition at line 333 of file NeuronGroup.cpp.
void NeuronGroup::setName | ( | const QString & | name | ) |
Sets the name of the neuron group
Definition at line 345 of file NeuronGroup.cpp.
void NeuronGroup::setNeuronMap | ( | NeuronMap * | newMap | ) |
Replaces the neuron map with a new neuron map. Neurons are not cleaned up because they might be included in the new map.
Definition at line 352 of file NeuronGroup.cpp.
void NeuronGroup::setParameters | ( | QHash< QString, double > & | paramMap | ) |
Sets the parameters in the neuron group. Throws an exception if these parameters are not appropriate for the type of neuron in this group.
Definition at line 362 of file NeuronGroup.cpp.
void spikestream::NeuronGroup::setStartNeuronID | ( | unsigned int | id | ) | [inline] |
Definition at line 63 of file NeuronGroup.h.
int NeuronGroup::size | ( | ) |
Returns the number of neurons in the group.
Definition at line 379 of file NeuronGroup.cpp.