示例#1
0
 public int CompareTo([System.Diagnostics.CodeAnalysis.AllowNull] VertexConnection <TVertex> other)
 {
     if (other.Origin.Equals(this.Origin) && other.Destination.Equals(this.Destination))
     {
         return(1);
     }
     return(0);
 }
示例#2
0
 public void AddNode(VertexConnection <TVertex> connection)
 {
     adjacencyTable[connection.Origin].Add(connection);
     adjacencyTable[connection.Destination]
     .Add(new VertexConnection <TVertex>(connection.Destination, connection.Origin, connection.Weight));
 }