public void TestAsColumnIndexes() { TemporalMemory tm = new TemporalMemory(); Connections cn = new Connections(); cn.SetColumnDimensions(new[] { 64, 64 }); cn.SetCellsPerColumn(4); TemporalMemory.Init(cn); int[] expectedIndexes = { 0, 3, 4, 4095 }; HashSet <Column> columns = cn.GetColumnSet(expectedIndexes); List <int> columnIdxList = Connections.AsColumnIndexes(columns); // Unordered test of equality HashSet <int> columnIdxSet = new HashSet <int>(columnIdxList); HashSet <int> expectedIdxSet = new HashSet <int>(expectedIndexes); Assert.IsTrue(Arrays.AreEqual(columnIdxSet, expectedIdxSet)); }