Skip to content

Commit 3b6ea96

Browse files
committed
review feedback
1 parent c9c436e commit 3b6ea96

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/htm/algorithms/SpatialPooler.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -500,10 +500,9 @@ void SpatialPooler::compute(const SDR &input, const bool learn, SDR &active) {
500500

501501
void SpatialPooler::boostOverlaps_(const vector<SynapseIdx> &overlaps, //TODO use Eigen sparse vector here
502502
vector<Real> &boosted) const {
503-
if(boostStrength_ < htm::Epsilon) {
504-
const auto begin = static_cast<const SynapseIdx*>(overlaps.data());
505-
boosted.assign(begin, begin + overlaps.size());
506-
return; //boost ~ 0.0, we can skip these computations.
503+
if(boostStrength_ < htm::Epsilon) { //boost ~ 0.0, we can skip these computations, just copy the data
504+
boosted.assign(overlaps.begin(), overlaps.end());
505+
return;
507506
}
508507
for (UInt i = 0; i < numColumns_; i++) {
509508
boosted[i] = overlaps[i] * boostFactors_[i];

0 commit comments

Comments
 (0)