From 03d38eb3190eb5e51fb18847fe0792013285bde5 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Tue, 8 Apr 2014 15:06:40 +1000 Subject: Reorganising source code --- Library/Cost.hs | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 Library/Cost.hs (limited to 'Library/Cost.hs') diff --git a/Library/Cost.hs b/Library/Cost.hs deleted file mode 100644 index 86cabdc..0000000 --- a/Library/Cost.hs +++ /dev/null @@ -1,29 +0,0 @@ -module Library.Cost( - cost, - nodeCost, - listCost - ) where - - - -import Data.Maybe -import Data.Graph.Inductive.Graph( Node ) -import qualified Data.Graph.Inductive.Graph as Graph -import Library.ProofGraph - - - -cost :: String -> Int -cost x = 1 - - -nodeCost :: PGraph -> Node -> Int -nodeCost graph node = - let label = fromJust (Graph.lab graph node) - nextCostLayer = map (nodeCost graph) (Graph.suc graph node) - in (cost label) + (sum nextCostLayer) - - -listCost :: [String] -> Int -listCost = sum . (map cost) - -- cgit