public InputProcessor(List<int> image) { heurisiticArray = new HeurisiticArray<List<int>>(new List<int>()); //define the functions which generate these heuristics var pixelData = new HeuristicSet<List<int>>("Pixel Data", i => new List<int>(), image); heurisiticArray.AddHeuristics(pixelData); var colorData = new HeuristicSet<List<int>>("Color data", i => new List<int>(), image); heurisiticArray.AddHeuristics(colorData); }
public HeurisiticArray<int[][]> AccessElement(int at) { var a = lines.ElementAt(at); var label = a.Split(',').First(); var data = a.Split(',').Skip(1).Select(v => int.Parse(v)); int[][] inputData = new int[28][]; for (int i = 0; i < 28; i++) { inputData[i] = new int[28]; } for (int i = 0; i < data.Count(); i++) { inputData[i / 28][i % 28] = data.ElementAt(i); } var set = new HeuristicSet<int[][]>("pixels", pixel => data, inputData); var b = new HeurisiticArray<int[][]>(inputData); b.AddLabel(new Label(label)); b.AddHeuristics(set); return b; }