Edge Class |
Namespace: Algs4Net
public class Edge : IComparable<Edge>
The Edge type exposes the following members.
Name | Description | |
---|---|---|
Edge(Int32, Int32) |
Initializes an edge between vertices v and w of an
undirected graph when weight is immaterial. | |
Edge(Int32, Int32, Double) |
Initializes an edge between vertices v and w of an undirected
graph with the given weight. |
Name | Description | |
---|---|---|
CompareTo |
Compares two edges by weight.
Note that CompareTo() is not consistent with Equals(),
which uses the reference equality implementation inherited from object. | |
MainTest | Demo test the Edge data type. | |
Other |
Returns the endpoint of this edge that is different from the given vertex. | |
ToString | Returns a string representation of this edge. (Overrides ObjectToString.) |
This class is a C# port from the original Java class Edge implementation by Robert Sedgewick and Kevin Wayne.