module IMinCostFlow where import Data.Array.IArray import Data.Graph.Inductive.Graph type MinCostFlowImpl1 gr a b i f c = (i, i) -> -- Range of edge indices (b -> i) -> -- Edge label -> unique edge index (b -> f) -> -- Edge label -> flow capacity (b -> c) -> -- Edge label -> cost per unit of flow gr a b -> -- Graph (Node, Node) -> -- (source, sink) Array i f -- ! edge index -> flow value type MinCostFlowImpl = forall gr a b i f c. (Graph gr, Ix i, Real f, Real c) => MinCostFlowImpl1 gr a b i f c