Exemplo n.º 1
0
 protected internal Edge(Vertex first, Vertex second, int weight = 1)
 {
     if (first.CompareTo(second) == 0)
     {
         throw new Exception($"Loops edges are not allowed: {first.Key}.");
     }
     else
     {
         _source = first;
         _dest   = second;
     }
     _weight = weight;
 }