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
Second version of the reduction.
[match/match.git]
/
program
/
Test.hs
diff --git
a/program/Test.hs
b/program/Test.hs
index
43f93a7
..
7840b5e
100644
(file)
--- a/
program/Test.hs
+++ b/
program/Test.hs
@@
-7,6
+7,10
@@
import Data.Array
import Data.Graph.Inductive.Graph
import Data.Graph.Inductive.Tree
import Data.Graph.Inductive.Graph
import Data.Graph.Inductive.Tree
+-- So we can call graphviz' at the GHCi prompt
+import Data.Graph.Inductive.Graphviz
+graphviz' g = Data.Graph.Inductive.Graphviz.graphviz' g
+
myGraph = mkGraph [(0, ()), (1, ()), (2, ())]
[(0, 1, 2), (0, 2, 3), (2, 1, -2)] :: Gr () Double
myGraph = mkGraph [(0, ()), (1, ()), (2, ())]
[(0, 1, 2), (0, 2, 3), (2, 1, -2)] :: Gr () Double
@@
-34,9
+38,9
@@
myPrefsArray = array ((0,0), (myNumRvrs-1,myNumProps-1)) [
]
myPrefs = \i j -> myPrefsArray ! (i, j)
]
myPrefs = \i j -> myPrefsArray ! (i, j)
-myInst = Instance myNumRvrs myNumProps myPrefs
+myInst = Instance myNumRvrs myNumProps
(const 1)
myPrefs
---rdnGraph = doReduction myInst (const (fromInteger wantExpertReviews))
-
--
(rdnFlowVal, rdnFlowResid) = umcf 0 1 rdnGraph
-
--
rdnFlow = flowDiff rdnGraph rdnFlowResid
+rdnGraph = doReduction myInst
+(rdnFlowVal, rdnFlowResid) = umcf 0 1 rdnGraph
+rdnFlow = flowDiff rdnGraph rdnFlowResid
myMatching = doMatching myInst
myMatching = doMatching myInst