Rename "desirability" to "preference" (much less awkward), with the
[match/match.git] / program / IMinCostFlow.hs
CommitLineData
fd0d2377
MM
1module IMinCostFlow where
2import Data.Array.IArray
3import Data.Graph.Inductive.Graph
4
5type 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
14type 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