|
CARLsim
4.1.0
CARLsim: a GPU-accelerated SNN simulator
|
#include <connection_monitor_core.h>
Public Member Functions | |
| ConnectionMonitorCore (SNN *snn, int monitorId, short int connId, int grpIdPre, int grpIdPost) | |
| constructor, created by CARLsim::setConnectionMonitor More... | |
| ~ConnectionMonitorCore () | |
| destructor, cleans up all the memory upon object deletion More... | |
| std::vector< std::vector< float > > | calcWeightChanges () |
| calculates weight changes since last snapshot and reports them in 2D weight change matrix More... | |
| void | clear () |
| deletes data from the 2D weight matrix More... | |
| FILE * | getConnectFileId () |
| returns pointer to connection file More... | |
| short int | getConnectId () |
| returns connection ID More... | |
| int | getFanIn (int neurPostId) |
| returns number of incoming synapses to post-synaptic neuron More... | |
| int | getFanOut (int neurPreId) |
| returns number of outgoing synapses of pre-synaptic neuron More... | |
| float | getMaxWeight (bool getCurrent=false) |
| returns max weight in the connection (getCurrent=false: RangeWeight.max, true: current largest) More... | |
| float | getMinWeight (bool getCurrent=false) |
| returns min weight in the connection (getCurrent=false: RangeWeight.min, true: current smallest) More... | |
| int | getMonitorId () |
| returns ConnectionMonitor ID More... | |
| int | getNumNeuronsPost () |
| returns number of neurons in post-synaptic group More... | |
| int | getNumNeuronsPre () |
| returns number of neurons in pre-synaptic group More... | |
| int | getNumSynapses () |
| returns number of synapses that exist in the connection More... | |
| int | getNumWeightsChanged (double minAbsChanged=1e-5) |
| returns number of weights with >=minAbsChanged weight change since last snapshot More... | |
| int | getNumWeightsInRange (double minVal, double maxVal) |
| returns number of weights with values in range e[minVal,maxVal] (inclusive) More... | |
| int | getNumWeightsWithValue (double value) |
| returns number of weights that have a certain value More... | |
| long int | getTimeMsCurrentSnapshot () |
| returns the timestamp of the current snapshot (not necessarily CARLsim::getSimTime) More... | |
| long int | getTimeMsLastSnapshot () |
| returns the timestamp of the last snapshot More... | |
| long int | getTimeMsSinceLastSnapshot () |
| returns the time passed between current and last snapshot More... | |
| double | getTotalAbsWeightChange () |
| returns absolute sum of all weight changes since last snapshot More... | |
| int | getUpdateTimeIntervalSec () |
| void | init () |
| void | print () |
| prints current weight state as 2D matrix (non-existent synapses: NAN, existent but zero weigth: 0.0f) More... | |
| void | printSparse (int neurPostId=ALL, int maxConn=100, int connPerLine=4, bool storeNewSnapshot=true) |
| void | setConnectFileId (FILE *connFileId) |
| sets pointer to connection file More... | |
| void | setUpdateTimeIntervalSec (int intervalSec) |
| sets time update interval (seconds) for periodically storing weights to file More... | |
| std::vector< std::vector< float > > | takeSnapshot () |
| bool | updateTime (int simTimeMs) |
| updates timestamp of the snapshots, returns true if update was needed More... | |
| void | updateWeight (int preId, int postId, float wt) |
| updates an entry in the current weight matrix (called by CARLsim::updateConnectionMonitor) More... | |
| void | writeConnectFileSnapshot (int simTimeMs, std::vector< std::vector< float > > wts) |
| writes each snapshot to connect file More... | |
Definition at line 67 of file connection_monitor_core.h.
| ConnectionMonitorCore | ( | SNN * | snn, |
| int | monitorId, | ||
| short int | connId, | ||
| int | grpIdPre, | ||
| int | grpIdPost | ||
| ) |
Definition at line 61 of file connection_monitor_core.cpp.
Definition at line 120 of file connection_monitor_core.cpp.
| std::vector< std::vector< float > > calcWeightChanges | ( | ) |
Definition at line 140 of file connection_monitor_core.cpp.
| void clear | ( | ) |
Definition at line 156 of file connection_monitor_core.cpp.
|
inline |
Definition at line 85 of file connection_monitor_core.h.
|
inline |
Definition at line 82 of file connection_monitor_core.h.
| int getFanIn | ( | int | neurPostId | ) |
Definition at line 166 of file connection_monitor_core.cpp.
| int getFanOut | ( | int | neurPreId | ) |
Definition at line 178 of file connection_monitor_core.cpp.
| float getMaxWeight | ( | bool | getCurrent = false | ) |
Definition at line 189 of file connection_monitor_core.cpp.
| float getMinWeight | ( | bool | getCurrent = false | ) |
Definition at line 214 of file connection_monitor_core.cpp.
|
inline |
Definition at line 101 of file connection_monitor_core.h.
|
inline |
Definition at line 107 of file connection_monitor_core.h.
|
inline |
Definition at line 104 of file connection_monitor_core.h.
|
inline |
Definition at line 110 of file connection_monitor_core.h.
| int getNumWeightsChanged | ( | double | minAbsChanged = 1e-5 | ) |
Definition at line 240 of file connection_monitor_core.cpp.
| int getNumWeightsInRange | ( | double | minVal, |
| double | maxVal | ||
| ) |
Definition at line 260 of file connection_monitor_core.cpp.
| int getNumWeightsWithValue | ( | double | value | ) |
Definition at line 287 of file connection_monitor_core.cpp.
|
inline |
Definition at line 122 of file connection_monitor_core.h.
|
inline |
Definition at line 125 of file connection_monitor_core.h.
|
inline |
Definition at line 128 of file connection_monitor_core.h.
| double getTotalAbsWeightChange | ( | ) |
Definition at line 297 of file connection_monitor_core.cpp.
|
inline |
Definition at line 130 of file connection_monitor_core.h.
| void init | ( | ) |
initialization method depends on several SNN data structures, so it has be to called at the end of setConnectionMonitor (or later)
Definition at line 84 of file connection_monitor_core.cpp.
| void print | ( | ) |
Definition at line 311 of file connection_monitor_core.cpp.
| void printSparse | ( | int | neurPostId = ALL, |
| int | maxConn = 100, |
||
| int | connPerLine = 4, |
||
| bool | storeNewSnapshot = true |
||
| ) |
prints current weight state as sparse list of (only allocated, existent) synapses give the option not to store the newly acquired snapshot (for printStatusConnectionMonitor); don't expose to user level
Definition at line 341 of file connection_monitor_core.cpp.
| void setConnectFileId | ( | FILE * | connFileId | ) |
Definition at line 414 of file connection_monitor_core.cpp.
| void setUpdateTimeIntervalSec | ( | int | intervalSec | ) |
Definition at line 431 of file connection_monitor_core.cpp.
| std::vector< std::vector< float > > takeSnapshot | ( | ) |
takes snapshot of current weight state and returns 2D matrix (non-existent synapses: NAN, existent but zero weight: 0.0f).
Definition at line 449 of file connection_monitor_core.cpp.
| bool updateTime | ( | int | simTimeMs | ) |
| void updateWeight | ( | int | preId, |
| int | postId, | ||
| float | wt | ||
| ) |
| void writeConnectFileSnapshot | ( | int | simTimeMs, |
| std::vector< std::vector< float > > | wts | ||
| ) |
Definition at line 517 of file connection_monitor_core.cpp.