Пример #1
0
    private static float Density(RoadData toEvaluate)
    {
        float rslt = toEvaluate.roadLock.locksNber;

        foreach (RoadData neighbor in toEvaluate.Neighbors())
        {
            rslt += neighbor.roadLock.locksNber;
        }

        return(rslt);
    }
Пример #2
0
    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);
    }
Пример #3
0
 public static List <RoadData> RouteStarNeighborhood(SearchData searchData, RoadData currentRoad)
 {
     return(currentRoad.Neighbors(includeNeverAccessible: false));
 }