X-Git-Url: https://mattmccutchen.net/match/match.git/blobdiff_plain/bc14b3b3a9345cb74bc7d8f3808a1d8cdd0bf479..8723ed6adebc35a25ca240acdb587444c85fb44f:/program/TestUtils.hs diff --git a/program/TestUtils.hs b/program/TestUtils.hs index acee1c7..96a170c 100644 --- a/program/TestUtils.hs +++ b/program/TestUtils.hs @@ -88,17 +88,17 @@ goGraph theGraph = l1 /\ l2 = (l1 \\ l2, l2 \\ l1) -- Evaluation! -runEvaluation nr np = do - let inst = runRandom myGen $ randomInstance nr np +runEvaluation cfg nr np = do + let inst = runRandom myGen $ randomInstance cfg nr np putStr (show inst ++ "\n") - let m0 = doMatching pmDefaults{loadTolerance = 0} inst + let m0 = doMatching cfg{loadTolerance = 0} inst putStr ("Matching with load tolerance 0:\n" ++ show m0 ++ "\n") - let m1 = doMatching pmDefaults{loadTolerance = 1} inst + let m1 = doMatching cfg{loadTolerance = 1} inst putStr ("Matching with load tolerance 1:\n" ++ show m1 ++ "\n") putStr ("Differences:\n" ++ show (m0 /\ m1) ++ "\n") - let e0 = evaluateMatching pmDefaults{loadTolerance = 0} inst m0 + let e0 = evaluateMatching cfg{loadTolerance = 0} inst m0 putStr ("Evaluation of first matching:\n" ++ show e0 ++ "\n") - let e1 = evaluateMatching pmDefaults{loadTolerance = 1} inst m1 + let e1 = evaluateMatching cfg{loadTolerance = 1} inst m1 putStr ("Evaluation of second matching:\n" ++ show e1 ++ "\n") putStr ("Evaluation differences:\n" ++ show (sortedDiffEvaluations e0 e1) ++ "\n")