diff --git a/src/htm/algorithms/SpatialPooler.cpp b/src/htm/algorithms/SpatialPooler.cpp index bd5b786f84..bad25cc34b 100644 --- a/src/htm/algorithms/SpatialPooler.cpp +++ b/src/htm/algorithms/SpatialPooler.cpp @@ -71,7 +71,7 @@ SpatialPooler::SpatialPooler() { } SpatialPooler::SpatialPooler( - const vector inputDimensions, const vector columnDimensions, + const vector& inputDimensions, const vector& columnDimensions, UInt potentialRadius, Real potentialPct, bool globalInhibition, Real localAreaDensity, UInt stimulusThreshold, Real synPermInactiveDec, Real synPermActiveInc, @@ -401,7 +401,6 @@ void SpatialPooler::initialize( // 1D input produces 1D output; 2D => 2D, etc. //TODO allow nD -> mD conversion NTA_CHECK(inputDimensions_.size() == columnDimensions_.size()); - NTA_CHECK(localAreaDensity > 0 && localAreaDensity <= MAX_LOCALAREADENSITY); setLocalAreaDensity(localAreaDensity); rng_ = Random(seed); diff --git a/src/htm/algorithms/SpatialPooler.hpp b/src/htm/algorithms/SpatialPooler.hpp index 65f008a4db..bebebd0352 100644 --- a/src/htm/algorithms/SpatialPooler.hpp +++ b/src/htm/algorithms/SpatialPooler.hpp @@ -67,8 +67,8 @@ class SpatialPooler : public Serializable static const constexpr Real BOOSTING_EXP = 1.0f * htm::Epsilon; //any value > BOOSTING_DISABLED enables the exponential boosting mode SpatialPooler(); - SpatialPooler(const vector inputDimensions, - const vector columnDimensions, + SpatialPooler(const vector& inputDimensions, + const vector& columnDimensions, UInt potentialRadius = 16u, Real potentialPct = 0.5f, bool globalInhibition = true, @@ -212,8 +212,8 @@ class SpatialPooler : public Serializable */ virtual void - initialize(const vector inputDimensions, - const vector columnDimensions, + initialize(const vector& inputDimensions, + const vector& columnDimensions, UInt potentialRadius = 16u, Real potentialPct = 0.5f, bool globalInhibition = true,