Module org.jgrapht.core
Package org.jgrapht.alg.interfaces
Class MinimumCostFlowAlgorithm.MinimumCostFlowImpl<E>
java.lang.Object
org.jgrapht.alg.interfaces.FlowAlgorithm.FlowImpl<E>
org.jgrapht.alg.interfaces.MinimumCostFlowAlgorithm.MinimumCostFlowImpl<E>
- Type Parameters:
E
- graph edge type
- All Implemented Interfaces:
FlowAlgorithm.Flow<E>
,MinimumCostFlowAlgorithm.MinimumCostFlow<E>
- Enclosing interface:
- MinimumCostFlowAlgorithm<V,
E>
public static class MinimumCostFlowAlgorithm.MinimumCostFlowImpl<E>
extends FlowAlgorithm.FlowImpl<E>
implements MinimumCostFlowAlgorithm.MinimumCostFlow<E>
Default implementation of the
MinimumCostFlowAlgorithm.MinimumCostFlow
-
Constructor Summary
ConstructorDescriptionMinimumCostFlowImpl
(double cost, Map<E, Double> flowMap) Constructs a new instance of minimum cost flow -
Method Summary
Methods inherited from class org.jgrapht.alg.interfaces.FlowAlgorithm.FlowImpl
getFlowMap
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jgrapht.alg.interfaces.FlowAlgorithm.Flow
getFlow, getFlowMap
-
Constructor Details
-
MinimumCostFlowImpl
Constructs a new instance of minimum cost flow- Parameters:
cost
- the cost of the flowflowMap
- the mapping defining the flow on the network
-
-
Method Details
-
getCost
public double getCost()Returns the cost of the flow- Specified by:
getCost
in interfaceMinimumCostFlowAlgorithm.MinimumCostFlow<E>
- Returns:
- the cost of the flow
-