From 34abcdcf0c6a90bf7161f29bb634872a4177a95d Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 9 Mar 2017 14:02:16 -0500 Subject: [PATCH] Extract maxD. --- src/SES/Myers.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/SES/Myers.hs b/src/SES/Myers.hs index 0c426e3ff..5ea8405e6 100644 --- a/src/SES/Myers.hs +++ b/src/SES/Myers.hs @@ -32,7 +32,7 @@ decompose myers = case myers of SES {} -> return [] MiddleSnake as bs -> do - for 0 ((m + n) `ceilDiv` 2) 1 $ \ d -> do + for 0 maxD 1 $ \ d -> do for (negate d) d 2 $ \ k -> do Endpoint x y <- findDPath Forward (EditDistance d) (Diagonal k) return () @@ -45,6 +45,7 @@ decompose myers = case myers of n = length as m = length bs delta = n - m + maxD = (m + n) `ceilDiv` 2 for :: (Real a, Monad m) => a -> a -> a -> (a -> m b) -> m () for from to by with