Пример #1
0
 /// <summary>
 /// Removes the edge from->unknown and replaces it with the edge from->to.
 /// 0->1->2:ReplaceEdgeFrom(0, 2):0->2 without resetting the last customer property.
 /// </summary>
 /// <param name="from"></param>
 /// <param name="to"></param>
 public void ReplaceEdgeFrom(int from, int to)
 {
     if (to == 0 && from == 0)
     { // clear all elements from the route.
         _route.Clear();
     }
     else if (to == 0)
     {
         _route.ReplaceEdgeFrom(from, -1);
     }
     else if (from == 0)
     { // TODO: replace the from customer.
         _route.ReplaceFirst(to);
     }
     else
     {
         _route.ReplaceEdgeFrom(from, to);
     }
 }