Commit | Line | Data |
---|---|---|
fd0d2377 MM |
1 | module IMinCostFlow where |
2 | import Data.Array.IArray | |
3 | import Data.Graph.Inductive.Graph | |
4 | ||
5 | type MinCostFlowImpl1 gr a b i f c = | |
6 | (i, i) -> -- Range of edge indices | |
7 | (b -> i) -> -- Edge label -> unique edge index | |
8 | (b -> f) -> -- Edge label -> flow capacity | |
9 | (b -> c) -> -- Edge label -> cost per unit of flow | |
10 | gr a b -> -- Graph | |
11 | (Node, Node) -> -- (source, sink) | |
12 | Array i f -- ! edge index -> flow value | |
13 | ||
14 | type MinCostFlowImpl = | |
15 | forall gr a b i f c. (Graph gr, Ix i, Real f, Real c) => | |
16 | MinCostFlowImpl1 gr a b i f c |