Interface FlowAlgorithm.Flow<E>

Type Parameters:
E - graph edge type
All Known Subinterfaces:
MaximumFlowAlgorithm.MaximumFlow<E>, MinimumCostFlowAlgorithm.MinimumCostFlow<E>
All Known Implementing Classes:
FlowAlgorithm.FlowImpl, MaximumFlowAlgorithm.MaximumFlowImpl, MinimumCostFlowAlgorithm.MinimumCostFlowImpl
Enclosing interface:
FlowAlgorithm<V,E>

public static interface FlowAlgorithm.Flow<E>
Represents a flow.
  • Method Summary

    Modifier and Type
    Method
    Description
    default double
    getFlow(E edge)
    Returns the flow on the edge
    Returns a mapping from the network flow edges to the corresponding flow values.
  • Method Details

    • getFlow

      default double getFlow(E edge)
      Returns the flow on the edge
      Parameters:
      edge - an edge from the flow network
      Returns:
      the flow on the edge
    • getFlowMap

      Map<E,Double> getFlowMap()
      Returns a mapping from the network flow edges to the corresponding flow values. The mapping contains all edges of the flow network regardless of whether there is a non-zero flow on an edge or not.
      Returns:
      a read-only map that defines a feasible flow.