Click or drag to resize
DirectedEdge Class
The DirectedEdge class represents a weighted edge in an . Each edge consists of two integers (naming the two vertices) and a real-value weight. The data type provides methods for accessing the two endpoints of the directed edge and the weight.
Inheritance Hierarchy
SystemObject
  Algs4NetDirectedEdge

Namespace: Algs4Net
Assembly: Algs4Net (in Algs4Net.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public class DirectedEdge

The DirectedEdge type exposes the following members.

Constructors
  NameDescription
Public methodDirectedEdge
Initializes a directed edge from vertex v to vertex w with the given weight.
Top
Properties
  NameDescription
Public propertyFrom
Returns the tail vertex of the directed edge.
Public propertyTo
Returns the head vertex of the directed edge.
Public propertyWeight
Returns the weight of the directed edge.
Top
Methods
  NameDescription
Public methodStatic memberMainTest
Demo test the DirectedEdge data type.
Public methodToString
Returns a string representation of the directed edge.
(Overrides ObjectToString.)
Top
Remarks

For additional documentation, see Section 4.4 of Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne.

This class is a C# port from the original Java class DirectedEdge implementation by the respective authors.

See Also