private static float Density(RoadData toEvaluate) { float rslt = toEvaluate.roadLock.locksNber; foreach (RoadData neighbor in toEvaluate.Neighbors()) { rslt += neighbor.roadLock.locksNber; } return(rslt); }
public static List <RoadData> RoadPathStarNeighborhood(SearchData searchData, RoadData currentRoad) {//TODO: diagonales!! List <RoadData> rslt; if (searchData.start == currentRoad) { rslt = currentRoad.AccessibleFreeNeighbors(searchData.startOrientation); } else { rslt = currentRoad.Neighbors(); } return(rslt); }
public static List <RoadData> RouteStarNeighborhood(SearchData searchData, RoadData currentRoad) { return(currentRoad.Neighbors(includeNeverAccessible: false)); }