58 connMonCorePtr_ = connMonCorePtr;
62 delete connMonCorePtr_;
86 std::string funcName =
"getFanIn()";
88 "getNumNeuronsPost()");
89 return connMonCorePtr_->
getFanIn(neurPostId);
93 std::string funcName =
"getFanOut()";
95 "getNumNeuronsPre()");
96 return connMonCorePtr_->
getFanOut(neurPreId);
108 return (
double) (connMonCorePtr_->
getMaxWeight(getCurrent));
112 return (
double) (connMonCorePtr_->
getMinWeight(getCurrent));
120 std::string funcName =
"getNumWeightsChanged()";
126 std::string funcName =
"getNumWeightsInRange()";
132 std::string funcName =
"getNumWeightsWithValue()";
165 connMonCorePtr_->
print();
169 std::string funcName =
"printSparse()";
171 "getNumNeuronsPost()");
174 connMonCorePtr_->
printSparse(neurPostId,maxConn,connPerLine);
178 std::string funcName =
"setUpdateTimeIntervalSec()";
double getPercentWeightsWithValue(double value)
Returns the percentage of weights in the connection with a particular value.
parameter cannot have smaller vaule than some vaule
int getNumWeightsInRange(double minValue, double maxValue)
Returns the number of weights in the connection whose values are within some range (inclusive) ...
short int getConnectId()
returns connection ID
int getNumNeuronsPost()
Returns the number of post-synaptic neurons.
std::vector< std::vector< float > > getPrevWeights()
LN20201118 returns calculates previous weights and reports them in 2D weight matrix.
long int getTimeMsSinceLastSnapshot()
returns the time passed between current and last snapshot
std::vector< std::vector< float > > getWeights()
LN20201118 returns calculates current and reports them in 2D weight matrix.
ConnectionMonitor(ConnectionMonitorCore *connMonCorePtr)
ConnectionMonitor constructor.
float getMinWeight(bool getCurrent=false)
returns min weight in the connection (getCurrent=false: RangeWeight.min, true: current smallest) ...
std::vector< std::vector< float > > takeSnapshot()
int getNumWeightsWithValue(double value)
Returns the number of weights in the connection with a particular value.
float getMaxWeight(bool getCurrent=false)
returns max weight in the connection (getCurrent=false: RangeWeight.max, true: current largest) ...
void setUpdateTimeIntervalSec(int intervalSec)
Sets the time interval (seconds) for writing snapshots to file.
long int getTimeMsLastSnapshot()
Returns the timestamp of the last snapshot (ms since beginning of simulation)
~ConnectionMonitor()
ConnectionMonitor destructor.
int getFanIn(int neurPostId)
returns number of incoming synapses to post-synaptic neuron
std::vector< std::vector< float > > getPrevWeights()
LN20201118 returns calculates previous weights and reports them in 2D weight matrix.
double getTotalAbsWeightChange()
returns absolute sum of all weight changes since last snapshot
int getNumWeightsInRange(double minVal, double maxVal)
returns number of weights with values in range e[minVal,maxVal] (inclusive)
void print()
Prints the current weight state as a 2D matrix (pre x post)
int getNumSynapses()
returns number of synapses that exist in the connection
long int getTimeMsCurrentSnapshot()
Returns the timestamp of the current snapshot (ms since beginning of simulation)
void printSparse(int neurPostId=ALL, int maxConn=100, int connPerLine=4)
Prints the current weight state as a sparse list of weights.
static void assertTrue(bool statement, errorType errorIfAssertionFails, std::string errorFunc, std::string errorMsgPrefix="", std::string errorMsgSuffix="")
simple wrapper for assert statement
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 print()
prints current weight state as 2D matrix (non-existent synapses: NAN, existent but zero weigth: 0...
int getNumNeuronsPre()
Returns the number of pre-synaptic neurons.
long int getTimeMsLastSnapshot()
returns the timestamp of the last snapshot
parameter must be smaller than
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
int getNumSynapses()
Returns the number of allocated synapses.
double getMaxWeight(bool getCurrent=false)
Returns the max weight in the connection.
std::vector< std::vector< float > > takeSnapshot()
Takes a snapshot of the current weight state.
void printSparse(int neurPostId=ALL, int maxConn=100, int connPerLine=4, bool storeNewSnapshot=true)
std::vector< std::vector< float > > getWeights()
LN20201118 returns calculates current and reports them in 2D weight matrix.
int getNumWeightsChanged(double minAbsChanged=1e-5)
returns number of weights with >=minAbsChanged weight change since last snapshot
int getNumWeightsWithValue(double value)
returns number of weights that have a certain value
void setUpdateTimeIntervalSec(int intervalSec)
sets time update interval (seconds) for periodically storing weights to file
double getTotalAbsWeightChange()
Returns the absolute sum of all the weight changes since the last snapshot.
int getFanOut(int neurPreId)
Returns the number of outgoing synapses for a specific pre-synaptic neuron.
std::vector< std::vector< float > > calcWeightChanges()
calculates weight changes since last snapshot and reports them in 2D weight change matrix ...
parameter must have positive value
long int getTimeMsCurrentSnapshot()
returns the timestamp of the current snapshot (not necessarily CARLsim::getSimTime) ...
int getNumNeuronsPost()
returns number of neurons in post-synaptic group
parameter cannot have negative value (opposite to "must be", but includes zero)
double getPercentWeightsChanged(double minAbsChanged=1e-5)
Returns the percentage of weights that have changed since the last snapshot.
int getNumWeightsChanged(double minAbsChanged=1e-5)
Returns the number of weights that have changed since the last snapshot.
double getMinWeight(bool getCurrent=false)
Returns the min weight in the connection.
int getFanOut(int neurPreId)
returns number of outgoing synapses of pre-synaptic neuron
long int getTimeMsSinceLastSnapshot()
Returns the timestamp difference of the current and last snapshot.