Exemple #1
0
        public HTMRegionViewer(HTMRegionAgent region)
        {
            InitializeComponent();
            _region = region;

            int columnViewersWidth = 150;

            _columnsViewers             = new HTMColumnsViewer[4];
            _columnsViewers[0]          = new HTMColumnsViewer(_region, HTMRegionViewerPropertyShowed.ColumnActivation, columnViewersWidth, columnViewersWidth);
            _columnsViewers[0].Location = new Point(10, 80);
            this.Controls.Add(_columnsViewers[0]);
            _columnsViewers[1]          = new HTMColumnsViewer(_region, HTMRegionViewerPropertyShowed.DistalSegmentsCount, columnViewersWidth, columnViewersWidth);
            _columnsViewers[1].Location = new Point(10 + (columnViewersWidth + 10), 80);
            this.Controls.Add(_columnsViewers[1]);
            _columnsViewers[2]          = new HTMColumnsViewer(_region, HTMRegionViewerPropertyShowed.ColumnOverlap, columnViewersWidth, columnViewersWidth);
            _columnsViewers[2].Location = new Point(10 + (columnViewersWidth + 10) * 2, 80);
            this.Controls.Add(_columnsViewers[2]);
            _columnsViewers[3]          = new HTMColumnsViewer(_region, HTMRegionViewerPropertyShowed.ColumnPermanence, columnViewersWidth, columnViewersWidth);
            _columnsViewers[3].Location = new Point(10 + (columnViewersWidth + 10) * 3, 80);
            this.Controls.Add(_columnsViewers[3]);

            int cellsViewersWidth  = 250;
            int cellsViewersHeight = 250;

            _cellsViewers = new HTMCellsViewer[_region.CellsPerColumn];
            for (int i = 0; i < _region.CellsPerColumn; i++)
            {
                _cellsViewers[i]          = new HTMCellsViewer(_region, i, cellsViewersWidth, cellsViewersHeight);
                _cellsViewers[i].Location = new Point(10 + (cellsViewersWidth + 10) * i, 270);
                _cellsViewers[i].Visible  = true;
                this.Controls.Add(_cellsViewers[i]);
            }
            this.Width  = 10 + (Math.Max(_region.CellsPerColumn, 4) + 1) * columnViewersWidth;
            this.Height = 560;

            doSpatialLearningCheckBox.Checked  = _region.DoSpatialLearning;
            doTemporalLearningCheckBox.Checked = _region.DoTemporalLearning;
        }
Exemple #2
0
        public HTMRegionViewer(HTMRegionAgent region)
        {
            InitializeComponent();
            _region = region;

            int columnViewersWidth = 150;
            _columnsViewers = new HTMColumnsViewer[4];
            _columnsViewers[0] = new HTMColumnsViewer(_region, HTMRegionViewerPropertyShowed.ColumnActivation, columnViewersWidth, columnViewersWidth);
            _columnsViewers[0].Location = new Point(10, 80);
            this.Controls.Add(_columnsViewers[0]);
            _columnsViewers[1] = new HTMColumnsViewer(_region, HTMRegionViewerPropertyShowed.DistalSegmentsCount, columnViewersWidth, columnViewersWidth);
            _columnsViewers[1].Location = new Point(10 + (columnViewersWidth + 10), 80);
            this.Controls.Add(_columnsViewers[1]);
            _columnsViewers[2] = new HTMColumnsViewer(_region, HTMRegionViewerPropertyShowed.ColumnOverlap, columnViewersWidth, columnViewersWidth);
            _columnsViewers[2].Location = new Point(10 + (columnViewersWidth + 10) * 2, 80);
            this.Controls.Add(_columnsViewers[2]);
            _columnsViewers[3] = new HTMColumnsViewer(_region, HTMRegionViewerPropertyShowed.ColumnPermanence, columnViewersWidth, columnViewersWidth);
            _columnsViewers[3].Location = new Point(10 + (columnViewersWidth + 10) * 3, 80);
            this.Controls.Add(_columnsViewers[3]);

            int cellsViewersWidth = 250;
            int cellsViewersHeight = 250;
            _cellsViewers = new HTMCellsViewer[_region.CellsPerColumn];
            for (int i = 0; i < _region.CellsPerColumn; i++)
            {
                _cellsViewers[i] = new HTMCellsViewer(_region, i, cellsViewersWidth, cellsViewersHeight);
                _cellsViewers[i].Location = new Point(10 + (cellsViewersWidth + 10) * i, 270);
                _cellsViewers[i].Visible = true;
                this.Controls.Add(_cellsViewers[i]);
            }
            this.Width = 10 + (Math.Max(_region.CellsPerColumn, 4) + 1)* columnViewersWidth;
            this.Height = 560;

            doSpatialLearningCheckBox.Checked = _region.DoSpatialLearning;
            doTemporalLearningCheckBox.Checked = _region.DoTemporalLearning;
        }