Ejemplo n.º 1
0
        public void TestAsCellObjects()
        {
            TemporalMemory tm = new TemporalMemory();
            Connections    cn = new Connections();

            cn.SetColumnDimensions(new[] { 64, 64 });
            cn.SetCellsPerColumn(4);
            TemporalMemory.Init(cn);

            int[]         indexes = { 0, 3, 4, 16383 };
            HashSet <int> idxSet  = new HashSet <int>(indexes);

            List <Cell> cells = cn.AsCellObjects(idxSet);

            foreach (Cell cell in cells)
            {
                Assert.IsTrue(idxSet.Contains(cell.GetIndex()));
            }
        }