Ejemplo n.º 1
0
 public static uint AddEdge(this RoutingNetwork network, uint vertex1, uint vertex2, EdgeData data, IEnumerable <ICoordinate> shape)
 {
     if (shape == null)
     {
         return(network.AddEdge(vertex1, vertex2, data, (ShapeBase)null));
     }
     return(network.AddEdge(vertex1, vertex2, data, (ShapeBase) new ShapeEnumerable(shape)));
 }
Ejemplo n.º 2
0
        public static void MergeVertices(this RoutingNetwork network, uint vertex1, uint vertex2)
        {
            List <RoutingEdge> routingEdgeList = new List <RoutingEdge>((IEnumerable <RoutingEdge>)network.GetEdgeEnumerator(vertex2));

            network.RemoveEdges(vertex2);
            for (int index = 0; index < routingEdgeList.Count; ++index)
            {
                if (!routingEdgeList[index].DataInverted)
                {
                    int num1 = (int)network.AddEdge(vertex1, routingEdgeList[index].To, routingEdgeList[index].Data, routingEdgeList[index].Shape);
                }
                else
                {
                    int num2 = (int)network.AddEdge(routingEdgeList[index].To, vertex1, routingEdgeList[index].Data, routingEdgeList[index].Shape);
                }
            }
        }
Ejemplo n.º 3
0
 public static uint AddEdge(this RoutingNetwork network, uint vertex1, uint vertex2, ushort profile, uint metaId, float distance, IEnumerable <ICoordinate> shape)
 {
     return(network.AddEdge(vertex1, vertex2, new EdgeData()
     {
         Distance = distance,
         MetaId = metaId,
         Profile = profile
     }, (ShapeBase) new ShapeEnumerable(shape)));
 }
Ejemplo n.º 4
0
 public static uint AddEdge(this RoutingNetwork network, uint vertex1, uint vertex2, EdgeData data, params ICoordinate[] shape)
 {
     return(network.AddEdge(vertex1, vertex2, data, (ShapeBase) new ShapeEnumerable((IEnumerable <ICoordinate>)shape)));
 }