From 24e1140f1c0f75e21ddb4219faca09f57da602cd Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Sun, 24 May 2009 00:23:15 +0100 Subject: [PATCH] Remove a function in hail This is not yet used. --- hail.hs | 44 -------------------------------------------- 1 file changed, 44 deletions(-) diff --git a/hail.hs b/hail.hs index e61a6317b..22c706837 100644 --- a/hail.hs +++ b/hail.hs @@ -112,50 +112,6 @@ options = "show help" ] -{- | Start computing the solution at the given depth and recurse until -we find a valid solution or we exceed the maximum depth. - --} -iterateDepth :: Cluster.Table -- ^ The starting table - -> Int -- ^ Remaining length - -> Cluster.NameList -- ^ Node idx to name list - -> Cluster.NameList -- ^ Inst idx to name list - -> Int -- ^ Max node name len - -> Int -- ^ Max instance name len - -> [[String]] -- ^ Current command list - -> Bool -- ^ Wheter to be silent - -> Cluster.Score -- ^ Score at which to stop - -> IO (Cluster.Table, [[String]]) -- ^ The resulting table and - -- commands -iterateDepth ini_tbl max_rounds ktn kti nmlen imlen - cmd_strs oneline min_score = - let Cluster.Table ini_nl ini_il ini_cv ini_plc = ini_tbl - all_inst = Container.elems ini_il - node_idx = map Node.idx . filter (not . Node.offline) $ - Container.elems ini_nl - fin_tbl = Cluster.checkMove node_idx ini_tbl all_inst - (Cluster.Table _ _ fin_cv fin_plc) = fin_tbl - ini_plc_len = length ini_plc - fin_plc_len = length fin_plc - allowed_next = (max_rounds < 0 || length fin_plc < max_rounds) - in - do - let - (sol_line, cmds) = Cluster.printSolutionLine ini_il ktn - nmlen imlen (head fin_plc) fin_plc_len - upd_cmd_strs = cmds:cmd_strs - unless (oneline || fin_plc_len == ini_plc_len) $ do - putStrLn sol_line - hFlush stdout - (if fin_cv < ini_cv then -- this round made success, try deeper - if allowed_next && fin_cv > min_score - then iterateDepth fin_tbl max_rounds ktn kti - nmlen imlen upd_cmd_strs oneline min_score - -- don't go deeper, but return the better solution - else return (fin_tbl, upd_cmd_strs) - else - return (ini_tbl, cmd_strs)) - -- | Formats the solution for the oneline display formatOneline :: Double -> Int -> Double -> String formatOneline ini_cv plc_len fin_cv = -- GitLab