X-Git-Url: https://mattmccutchen.net/match/match.git/blobdiff_plain/08532bcc65c3e99738cddecdd86e1a7904100119..5a07db44406bad03321a90b0814cc4496c6b7d63:/program/Instance.hs diff --git a/program/Instance.hs b/program/Instance.hs index 95e00ee..07841e3 100644 --- a/program/Instance.hs +++ b/program/Instance.hs @@ -15,7 +15,9 @@ data Instance = Instance instance Show Instance where show (Instance numRvrs numProps loadA prefA) = - "Instance: " ++ show numRvrs ++ " reviewers, " ++ show numProps ++ " proposals\n" - ++ "Reviewer relative load: " ++ show loadA ++ "\n" - ++ "Preferences:\n" - ++ formatTable (array2DtoListOfLists (amap2 show prefA :: Array (Int, Int) String)) + let theRvrs = [0..numRvrs-1]; theProps = [0..numProps-1] in + "Instance with " ++ show numRvrs ++ " reviewers and " ++ show numProps ++ " proposals:\n" ++ formatTable ( + ( "" : map (\i -> "R#" ++ show i ) theRvrs) : + ( "RLoad" : map (\i -> show (loadA ! i) ) theRvrs) : + map (\j -> ("P#" ++ show j) : map (\i -> show (prefA ! (i, j))) theRvrs) theProps + )