FlowEdge Class |
Namespace: Algs4Net
public class FlowEdge
The FlowEdge type exposes the following members.
Name | Description | |
---|---|---|
![]() | FlowEdge(FlowEdge) |
Initializes a flow edge from another flow edge. |
![]() | FlowEdge(Int32, Int32, Double) |
Initializes an edge from vertex v to vertex w with
the given capacity and zero flow. |
![]() | FlowEdge(Int32, Int32, Double, Double) |
Initializes an edge from vertex v to vertex w with
the given capacity and flow. |
Name | Description | |
---|---|---|
![]() | Capacity |
Returns the capacity of the edge. |
![]() | Flow |
Returns the flow on the edge. |
![]() | From |
Returns the tail vertex of the edge. |
![]() | To |
Returns the head vertex of the edge. |
Name | Description | |
---|---|---|
![]() | AddResidualFlowTo |
Increases the flow on the edge in the direction to the given vertex.
If vertex is the tail vertex, this increases the flow on the edge by delta;
if vertex is the head vertex, this decreases the flow on the edge by delta. |
![]() ![]() | MainTest |
Demo test the FlowEdge data type. |
![]() | Other |
Returns the endpoint of the edge that is different from the given vertex
(unless the edge represents a self-loop in which case it returns the same vertex). |
![]() | ResidualCapacityTo |
Returns the residual capacity of the edge in the direction
to the given vertex. |
![]() | ToString |
Returns a string representation of the edge. (Overrides ObjectToString.) |
For additional documentation, see Section 6.4 of Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne.
This class is a C# port from the original Java class FlowEdge implementation by the respective authors.