From e74119d3de9c8c883fb059dc9407cee3d2b182bb Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 10 Mar 2017 14:01:51 -0500 Subject: [PATCH] :fire: the bogus shortcuts. --- src/SES/Myers.hs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/SES/Myers.hs b/src/SES/Myers.hs index 4cedd2562..2768a1a35 100644 --- a/src/SES/Myers.hs +++ b/src/SES/Myers.hs @@ -98,9 +98,7 @@ decompose myers = let ?callStack = popCallStack callStack in case myers of forwardEndpoint <- findDPath graph Forward (EditDistance d) (Diagonal k) backwardV <- gets backward let reverseEndpoint = backwardV `at` k - if x forwardEndpoint >= n && y forwardEndpoint >= m then - return (Just (Snake reverseEndpoint forwardEndpoint, EditDistance 0)) - else if odd delta && k `inInterval` (delta - pred d, delta + pred d) && overlaps forwardEndpoint reverseEndpoint then + if odd delta && k `inInterval` (delta - pred d, delta + pred d) && overlaps forwardEndpoint reverseEndpoint then return (Just (Snake reverseEndpoint forwardEndpoint, EditDistance $ 2 * d - 1)) else continue) @@ -108,9 +106,7 @@ decompose myers = let ?callStack = popCallStack callStack in case myers of reverseEndpoint <- findDPath graph Reverse (EditDistance d) (Diagonal (k + delta)) forwardV <- gets forward let forwardEndpoint = forwardV `at` (k + delta) - if x reverseEndpoint <= 0 && y forwardEndpoint <= 0 then - return (Just (Snake reverseEndpoint forwardEndpoint, EditDistance $ 2 * d)) - else if even delta && (k + delta) `inInterval` (negate d, d) && overlaps forwardEndpoint reverseEndpoint then + if even delta && (k + delta) `inInterval` (negate d, d) && overlaps forwardEndpoint reverseEndpoint then return (Just (Snake reverseEndpoint forwardEndpoint, EditDistance $ 2 * d)) else continue)