Exemplo n.º 1
0
 public void AddEdge(Location source, Location target)
 {
     if (_graph.ContainsVertex(source) && _graph.ContainsVertex(target))
     {
         var edge = new DirectedLazyEdge(source, target);
         _graph.AddEdge(edge);
         edge = new DirectedLazyEdge(target, source);
         _graph.AddEdge(edge);
     }
     else
     {
         Logging.Write("Vertex: " + source + " : " + target);
     }
 }
Exemplo n.º 2
0
 public static double GetDistance(DirectedLazyEdge edge)
 {
     return(edge.Source.GetDistanceTo(edge.Target));
 }