Matt McCutchen's Web Site
/
match
/
match.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
PMConfig isn't just for ProposalMatcher anymore; it's about to gain settings for
[match/match.git]
/
program
/
Test.hs
diff --git
a/program/Test.hs
b/program/Test.hs
index
e684859
..
d0bd6e2
100644
(file)
--- a/
program/Test.hs
+++ b/
program/Test.hs
@@
-3,25
+3,33
@@
module Test (
module Test,
module TestUtils,
module Test,
module TestUtils,
+ -- Manipulate configurations.
+ module PMConfig,
+ module PMDefaults,
+
-- Generate instances.
-- Generate instances.
- module Instance,
- module InstanceGenerator,
+ module
PM
Instance,
+ module
PM
InstanceGenerator,
-- Solve instances.
module ProposalMatcher,
-- Solve instances.
module ProposalMatcher,
- module ProposalMatcherConfig,
-- Run randomized things.
module System.Random,
-- Run randomized things.
module System.Random,
- module RandomizedMonad
+ module RandomizedMonad,
+
+ -- Evaluate.
+ module Evaluation
) where
import TestUtils
) where
import TestUtils
-import Instance
-import InstanceGenerator
+import PMConfig
+import PMDefaults
+import PMInstance
+import PMInstanceGenerator
import ProposalMatcher
import ProposalMatcher
-import ProposalMatcherConfig hiding (Wt)
import System.Random
import RandomizedMonad
import System.Random
import RandomizedMonad
+import Evaluation
-- Other imports we need
import BellmanFord
-- Other imports we need
import BellmanFord
@@
-37,7
+45,7
@@
myGraph = mkGraph [(0, ()), (1, ()), (2, ())]
bfResult = bellmanFord snd 0 myGraph
bfResult = bellmanFord snd 0 myGraph
-flowArray = minCostFlow (0, 2) fst (const 1) snd myGraph (0, 1)
+flowArray = minCostFlow
pmDefaults
(0, 2) fst (const 1) snd myGraph (0, 1)
myNCGraph = mkGraph [(0, ())] [(0, 0, -1)] :: Gr () Int
bfNCResult = bellmanFord id 0 myNCGraph
myNCGraph = mkGraph [(0, ())] [(0, 0, -1)] :: Gr () Int
bfNCResult = bellmanFord id 0 myNCGraph
@@
-62,12
+70,12
@@
myPrefs = transposeArray $ listArray ((0,0), (myNumProps-1,myNumRvrs-1)) [
15, 25, 20, 20, 15
] :: UArray (Int, Int) Wt
15, 25, 20, 20, 15
] :: UArray (Int, Int) Wt
-myInst = Instance myNumRvrs myNumProps (constArray (0, myNumRvrs-1) 1) myPrefs
+myInst =
PM
Instance myNumRvrs myNumProps (constArray (0, myNumRvrs-1) 1) myPrefs
-rdnResult = doReduction myInst
+rdnResult = doReduction
pmDefaults
myInst
ReductionResult rrg rrso rrsi rreib rredi = rdnResult
ReductionResult rrg rrso rrsi rreib rredi = rdnResult
-rdnFlowArray = minCostFlow rreib reIdx reCap reCost rrg (rrso, rrsi)
+rdnFlowArray = minCostFlow
pmDefaults
rreib reIdx reCap reCost rrg (rrso, rrsi)
rrg2 = flowAnnotate rrg rdnFlowArray
rrg2 = flowAnnotate rrg rdnFlowArray
-myMatching = doMatching myInst
+myMatching = doMatching
pmDefaults
myInst
iGraph = showInstanceAsGraph myInst myMatching -- Visualize me!
iGraph = showInstanceAsGraph myInst myMatching -- Visualize me!