CARLsim
4.1.0
CARLsim: a GPU-accelerated SNN simulator
|
Go to the documentation of this file.
56 connMonCorePtr_ = connMonCorePtr;
60 delete connMonCorePtr_;
75 std::string funcName =
"getFanIn()";
77 "getNumNeuronsPost()");
78 return connMonCorePtr_->
getFanIn(neurPostId);
82 std::string funcName =
"getFanOut()";
84 "getNumNeuronsPre()");
85 return connMonCorePtr_->
getFanOut(neurPreId);
97 return (
double) (connMonCorePtr_->
getMaxWeight(getCurrent));
101 return (
double) (connMonCorePtr_->
getMinWeight(getCurrent));
109 std::string funcName =
"getNumWeightsChanged()";
115 std::string funcName =
"getNumWeightsInRange()";
121 std::string funcName =
"getNumWeightsWithValue()";
154 connMonCorePtr_->
print();
158 std::string funcName =
"printSparse()";
160 "getNumNeuronsPost()");
163 connMonCorePtr_->
printSparse(neurPostId,maxConn,connPerLine);
167 std::string funcName =
"setUpdateTimeIntervalSec()";
double getPercentWeightsWithValue(double value)
Returns the percentage of weights in the connection with a particular value.
void setUpdateTimeIntervalSec(int intervalSec)
sets time update interval (seconds) for periodically storing weights to file
int getNumWeightsInRange(double minVal, double maxVal)
returns number of weights with values in range e[minVal,maxVal] (inclusive)
void setUpdateTimeIntervalSec(int intervalSec)
Sets the time interval (seconds) for writing snapshots to file.
@ MUST_BE_SMALLER
parameter must be smaller than
double getPercentWeightsChanged(double minAbsChanged=1e-5)
Returns the percentage of weights that have changed since the last snapshot.
~ConnectionMonitor()
ConnectionMonitor destructor.
std::vector< std::vector< float > > calcWeightChanges()
calculates weight changes since last snapshot and reports them in 2D weight change matrix
int getNumWeightsInRange(double minValue, double maxValue)
Returns the number of weights in the connection whose values are within some range (inclusive)
long int getTimeMsSinceLastSnapshot()
Returns the timestamp difference of the current and last snapshot.
float getMinWeight(bool getCurrent=false)
returns min weight in the connection (getCurrent=false: RangeWeight.min, true: current smallest)
int getNumNeuronsPost()
Returns the number of post-synaptic neurons.
@ MUST_BE_POSITIVE
parameter must have positive value
long int getTimeMsCurrentSnapshot()
Returns the timestamp of the current snapshot (ms since beginning of simulation)
long int getTimeMsCurrentSnapshot()
returns the timestamp of the current snapshot (not necessarily CARLsim::getSimTime)
void print()
prints current weight state as 2D matrix (non-existent synapses: NAN, existent but zero weigth: 0....
void print()
Prints the current weight state as a 2D matrix (pre x post)
int getNumWeightsWithValue(double value)
Returns the number of weights in the connection with a particular value.
void printSparse(int neurPostId=ALL, int maxConn=100, int connPerLine=4, bool storeNewSnapshot=true)
long int getTimeMsLastSnapshot()
Returns the timestamp of the last snapshot (ms since beginning of simulation)
short int getConnectId()
returns connection ID
int getNumWeightsWithValue(double value)
returns number of weights that have a certain value
float getMaxWeight(bool getCurrent=false)
returns max weight in the connection (getCurrent=false: RangeWeight.max, true: current largest)
int getFanIn(int neurPostId)
Returns the number of incoming synapses for a specific post-synaptic neuron.
short int getConnectId()
Returns the connection ID that this ConnectionMonitor is managing.
void printSparse(int neurPostId=ALL, int maxConn=100, int connPerLine=4)
Prints the current weight state as a sparse list of weights.
int getNumNeuronsPost()
returns number of neurons in post-synaptic group
int getNumWeightsChanged(double minAbsChanged=1e-5)
returns number of weights with >=minAbsChanged weight change since last snapshot
int getFanOut(int neurPreId)
returns number of outgoing synapses of pre-synaptic neuron
long int getTimeMsLastSnapshot()
returns the timestamp of the last snapshot
int getNumSynapses()
returns number of synapses that exist in the connection
double getPercentWeightsInRange(double minValue, double maxValue)
Returns the percentage of weights whose values are within some range (inclusive)
std::vector< std::vector< float > > calcWeightChanges()
Reports the weight changes since the last snapshot in a 2D weight matrix (pre x post)
int getNumNeuronsPre()
returns number of neurons in pre-synaptic group
double getTotalAbsWeightChange()
Returns the absolute sum of all the weight changes since the last snapshot.
int getNumSynapses()
Returns the number of allocated synapses.
int getNumNeuronsPre()
Returns the number of pre-synaptic neurons.
std::vector< std::vector< float > > takeSnapshot()
Takes a snapshot of the current weight state.
double getTotalAbsWeightChange()
returns absolute sum of all weight changes since last snapshot
double getMaxWeight(bool getCurrent=false)
Returns the max weight in the connection.
int getNumWeightsChanged(double minAbsChanged=1e-5)
Returns the number of weights that have changed since the last snapshot.
@ MUST_BE_SET_TO
parameter must be set to
double getMinWeight(bool getCurrent=false)
Returns the min weight in the connection.
static void assertTrue(bool statement, errorType errorIfAssertionFails, std::string errorFunc, std::string errorMsgPrefix="", std::string errorMsgSuffix="")
simple wrapper for assert statement
@ CANNOT_BE_NEGATIVE
parameter cannot have negative value (opposite to "must be", but includes zero)
long int getTimeMsSinceLastSnapshot()
returns the time passed between current and last snapshot
@ CANNOT_BE_SMALLER
parameter cannot have smaller vaule than some vaule
int getFanIn(int neurPostId)
returns number of incoming synapses to post-synaptic neuron
std::vector< std::vector< float > > takeSnapshot()
ConnectionMonitor(ConnectionMonitorCore *connMonCorePtr)
ConnectionMonitor constructor.
int getFanOut(int neurPreId)
Returns the number of outgoing synapses for a specific pre-synaptic neuron.