public static List <string> getOptions(double[] coordinates, KNearestNeighbors knn) { List <string> options = new List <string>(); Dictionary <int, string> labelMap = Fingerprinting.ReadLabelMap(); int[] list = labelMap.Keys.ToArray(); foreach (double[] g in knn.GetNearestNeighbors(coordinates, out list)) { options.Add(getRoomname(knn.Decide(g))); } return(options); }
public static string getRoomname(int roomInt) { Dictionary <int, string> labelMap = Fingerprinting.ReadLabelMap(); return(labelMap[roomInt]); }