public Group(int id) { Doors = new List<Door>(); Buildings = new List<string>(); this.Id = id; foreach (CsvRow row in ListGroups.CSV) { if (row.GroupId == id) { if (!Buildings.Contains(row.Building)) { Buildings.Add(row.Building); } Door d = new Door(row.Latitude, row.Longitude, row.DoorId, id); Doors.Add(d); } } }
public Edge(Door doorOne, Door doorTwo) { DoorOne = doorOne; DoorTwo = doorTwo; Distance = DoorOne.Distance(DoorTwo); }
public static Edge GetEdge(Door doorA, Door doorB) { return GetEdge(doorA.GroupId, doorB.GroupId); }