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); }
public void AddNode(VertexConnection <TVertex> connection) { adjacencyTable[connection.Origin].Add(connection); adjacencyTable[connection.Destination] .Add(new VertexConnection <TVertex>(connection.Destination, connection.Origin, connection.Weight)); }