Class MinimumCostFlowProblem.MinimumCostFlowProblemImpl<V,​E>

java.lang.Object
org.jgrapht.alg.flow.mincost.MinimumCostFlowProblem.MinimumCostFlowProblemImpl<V,​E>
Type Parameters:
V - the graph vertex type
E - the graph edge type
All Implemented Interfaces:
MinimumCostFlowProblem<V,​E>
Enclosing interface:
MinimumCostFlowProblem<V,​E>

public static class MinimumCostFlowProblem.MinimumCostFlowProblemImpl<V,​E>
extends java.lang.Object
implements MinimumCostFlowProblem<V,​E>
Default implementation of a Minimum Cost Flow Problem
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.jgrapht.alg.flow.mincost.MinimumCostFlowProblem

    MinimumCostFlowProblem.MinimumCostFlowProblemImpl<V,​E>
  • Constructor Summary

    Constructors 
    Constructor Description
    MinimumCostFlowProblemImpl​(Graph<V,​E> graph, java.util.function.Function<V,​java.lang.Integer> supplyMap, java.util.function.Function<E,​java.lang.Integer> arcCapacityUpperBounds)
    Constructs a new minimum cost flow problem without arc capacity lower bounds.
    MinimumCostFlowProblemImpl​(Graph<V,​E> graph, java.util.function.Function<V,​java.lang.Integer> nodeSupplies, java.util.function.Function<E,​java.lang.Integer> arcCapacityUpperBounds, java.util.function.Function<E,​java.lang.Integer> arcCapacityLowerBounds)
    Constructs a new minimum cost flow problem
    MinimumCostFlowProblemImpl​(Graph<V,​E> graph, java.util.function.Function<V,​java.lang.Integer> nodeSupplies, java.util.function.Function<E,​java.lang.Integer> arcCapacityUpperBounds, java.util.function.Function<E,​java.lang.Integer> arcCapacityLowerBounds, java.util.function.Function<E,​java.lang.Double> arcCosts)
    Constructs a new minimum cost flow problem
  • Method Summary

    Modifier and Type Method Description
    java.util.function.Function<E,​java.lang.Integer> getArcCapacityLowerBounds()
    Returns a function which specifies the minimum capacity of an arc.
    java.util.function.Function<E,​java.lang.Integer> getArcCapacityUpperBounds()
    Returns a function which specifies the maximum capacity of an arc.
    java.util.function.Function<E,​java.lang.Double> getArcCosts()
    Returns a function which specifies the network arc costs.
    Graph<V,​E> getGraph()
    Returns the flow network
    java.util.function.Function<V,​java.lang.Integer> getNodeSupply()
    Returns a function which defines the supply and demand of each node in that network.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MinimumCostFlowProblemImpl

      public MinimumCostFlowProblemImpl​(Graph<V,​E> graph, java.util.function.Function<V,​java.lang.Integer> supplyMap, java.util.function.Function<E,​java.lang.Integer> arcCapacityUpperBounds)
      Constructs a new minimum cost flow problem without arc capacity lower bounds.
      Parameters:
      graph - the flow network
      supplyMap - the node demands
      arcCapacityUpperBounds - the arc capacity upper bounds
    • MinimumCostFlowProblemImpl

      public MinimumCostFlowProblemImpl​(Graph<V,​E> graph, java.util.function.Function<V,​java.lang.Integer> nodeSupplies, java.util.function.Function<E,​java.lang.Integer> arcCapacityUpperBounds, java.util.function.Function<E,​java.lang.Integer> arcCapacityLowerBounds)
      Constructs a new minimum cost flow problem
      Parameters:
      graph - the flow network
      nodeSupplies - the node demands
      arcCapacityUpperBounds - the arc capacity upper bounds
      arcCapacityLowerBounds - the arc capacity lower bounds
    • MinimumCostFlowProblemImpl

      public MinimumCostFlowProblemImpl​(Graph<V,​E> graph, java.util.function.Function<V,​java.lang.Integer> nodeSupplies, java.util.function.Function<E,​java.lang.Integer> arcCapacityUpperBounds, java.util.function.Function<E,​java.lang.Integer> arcCapacityLowerBounds, java.util.function.Function<E,​java.lang.Double> arcCosts)
      Constructs a new minimum cost flow problem
      Parameters:
      graph - the flow network
      nodeSupplies - the node demands
      arcCapacityUpperBounds - the arc capacity upper bounds
      arcCapacityLowerBounds - the arc capacity lower bounds
      arcCosts - the arc costs
  • Method Details

    • getGraph

      public Graph<V,​E> getGraph()
      Returns the flow network
      Specified by:
      getGraph in interface MinimumCostFlowProblem<V,​E>
      Returns:
      the flow network
    • getNodeSupply

      public java.util.function.Function<V,​java.lang.Integer> getNodeSupply()
      Returns a function which defines the supply and demand of each node in that network. Supplies can be positive, negative or 0. Nodes with positive negative supply are the demand nodes, nodes with zero supply are the transhipment nodes. Flow is always directed from nodes with positive supply to nodes with negative supply. Summed over all nodes, the total demand should equal 0.
      Specified by:
      getNodeSupply in interface MinimumCostFlowProblem<V,​E>
      Returns:
      supply function
    • getArcCapacityLowerBounds

      public java.util.function.Function<E,​java.lang.Integer> getArcCapacityLowerBounds()
      Returns a function which specifies the minimum capacity of an arc. The minimum capacity is the minimum amount of flow that has to go through an arc.
      Specified by:
      getArcCapacityLowerBounds in interface MinimumCostFlowProblem<V,​E>
      Returns:
      arc capacity lower bounding function
    • getArcCapacityUpperBounds

      public java.util.function.Function<E,​java.lang.Integer> getArcCapacityUpperBounds()
      Returns a function which specifies the maximum capacity of an arc. The flow through an arc cannot exceed this upper bound.
      Specified by:
      getArcCapacityUpperBounds in interface MinimumCostFlowProblem<V,​E>
      Returns:
      arc capacity upper bounding function
    • getArcCosts

      public java.util.function.Function<E,​java.lang.Double> getArcCosts()
      Returns a function which specifies the network arc costs. Every unit of flow through an arc will have the price of the cost of this arc.
      Specified by:
      getArcCosts in interface MinimumCostFlowProblem<V,​E>
      Returns:
      arc cost function