예제 #1
0
        public void bumpUpWeakColumns(BumUpWeakColumnsMsg msg)
        {
            ParallelOptions opts = new ParallelOptions();

            opts.MaxDegreeOfParallelism = msg.ColumnKeys.Count;

            Parallel.ForEach(msg.ColumnKeys, opts, (colPair) =>
            {
                Column weakColumn = (Column)dict[colPair.Key];

                Pool pool     = weakColumn.ProximalDendrite.RFPool;
                double[] perm = pool.getSparsePermanences();
                ArrayUtils.raiseValuesBy(this.config.SynPermBelowStimulusInc, perm);
                int[] indexes = pool.getSparsePotential();

                weakColumn.UpdatePermanencesForColumnSparse(this.config, perm, indexes, true);
            });

            Sender.Tell(0, Self);
        }
예제 #2
0
        private object bumpUpWeakColumns(BumUpWeakColumnsMsg msg)
        {
            ParallelOptions opts = new ParallelOptions();

            opts.MaxDegreeOfParallelism = msg.ColumnKeys.Count;

            Parallel.ForEach(msg.ColumnKeys, opts, (colPair) =>
            {
                Column weakColumn = GetColumn(colPair.Key);

                Pool pool     = weakColumn.ProximalDendrite.RFPool;
                double[] perm = pool.getSparsePermanences();
                ArrayUtils.raiseValuesBy(this.HtmConfig.SynPermBelowStimulusInc, perm);
                int[] indexes = pool.getSparsePotential();

                weakColumn.UpdatePermanencesForColumnSparse(this.HtmConfig, perm, indexes, true);
            });

            return(0);
        }