--- /dev/null
+module Instance where
+import Data.Array.IArray
+import Data.Array.Unboxed
+import ArrayStuff
+import Formatter
+
+type Wt = Double -- must implement RealFrac
+
+data Instance = Instance
+ Int -- numReviewers
+ Int -- numProposals
+ (UArray Int Wt) -- ! reviewer -> relative load
+ (UArray (Int, Int) Wt) -- ! (reviewer, proposal) -> pref
+ deriving Eq
+
+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))