Class DirectedEdge<TWeight>
- Namespace
- AlgorithmsSW.EdgeWeightedDigraph
- Assembly
- AlgorithmsSW.dll
Represents a directed edge with a weight.
public class DirectedEdge<TWeight>
Type Parameters
TWeightThe type of the weight. See Weights.
- Inheritance
-
DirectedEdge<TWeight>
- Inherited Members
- Extension Methods
Constructors
DirectedEdge(int, int, TWeight)
Represents a directed edge with a weight.
public DirectedEdge(int source, int target, TWeight weight)
Parameters
sourceintThe vertex the edge is directed from.
targetintThe vertex the edge is directed to.
weightTWeightThe weight of the edge.
Properties
Source
Gets the vertex the edge is directed from.
public int Source { get; }
Property Value
Target
Gets the vertex the edge is directed to.
public int Target { get; }
Property Value
Weight
Gets the weight of the edge.
public TWeight Weight { get; }
Property Value
- TWeight
Methods
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.