From 0624d24aa7eb9e9d20fc138c2b9bfd5573f924f1 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 9 Mar 2017 10:48:11 -0500 Subject: [PATCH] Define a test of endpoint overlap. --- src/SES/Myers.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/SES/Myers.hs b/src/SES/Myers.hs index 1037a893f..c0136800f 100644 --- a/src/SES/Myers.hs +++ b/src/SES/Myers.hs @@ -49,6 +49,9 @@ at v (Diagonal k) = do Diagonal o <- gets offset return (Endpoint (v Vector.! o + k, 0)) +overlaps :: Endpoint -> Endpoint -> Bool +overlaps (Endpoint (x, y)) (Endpoint (u, v)) = x - y == u - v && x <= u + -- Instances