2 import Data.Array.IArray
3 import Data.Array.Unboxed
7 type Wt = Double -- must implement RealFrac
9 data Instance = Instance
12 (UArray Int Wt) -- ! reviewer -> relative load
13 (UArray (Int, Int) Wt) -- ! (reviewer, proposal) -> pref
16 instance Show Instance where
17 show (Instance numRvrs numProps loadA prefA) =
18 "Instance: " ++ show numRvrs ++ " reviewers, " ++ show numProps ++ " proposals\n"
19 ++ "Reviewer relative load: " ++ show loadA ++ "\n"
21 ++ formatTable (array2DtoListOfLists (amap2 show prefA :: Array (Int, Int) String))